<html xmlns="http://www.w3.org/1999/xhtml"><head>
  
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>SpreadsheetML Support Module Functions </title>
    <meta name="Homepage" content="server, administration, Mark Logic, xml, xquery, database">
    <meta name="Keywords" content="server, administration, Mark Logic, xml, xquery, database">
    <meta name="Description" content="SpreadsheetML Support Module Functions">
    <link href="images/admin.css" type="text/css" rel="stylesheet">
    <script type="text/javascript" language="javascript" src="images/tree.js"></script>
  </head><div FirebugVersion="1.3.3" style="display: none;" id="_firebugConsole"></div><body>
<form name="apidocs" action="apidocs.xqy" method="get">
      <input name="fname" value="SpreadsheetML" type="hidden">
      <table width="100%" border="0" cellpadding="0" cellspacing="0" height="400">
   <tbody><tr>
	  
	  <td class="mainbody" valign="top">
  <table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tbody><tr style="background-color: rgb(160, 0, 46);" valign="top">
		<td width="100%" align="left" height="90">
        <div><img src="images/varspace.gif" alt="" width="178" height="1"></div>
        <div class="host-details" style="padding-left: 20px; padding-top: 10px;">
          <div>This page was generated</div>
          <div>April&nbsp;7,&nbsp;2009</div>
          <div>1:37&nbsp;PM</div>
        </div>
      </td>
		<td style="background-image: url(images/top-right-right-background.gif); background-repeat: no-repeat;" valign="bottom" width="420" align="left">
      <div><img src="images/varspace.gif" alt="" width="420" height="1"></div>
      <div class="page-name" style="text-align: right; padding-right: 8px; padding-bottom: 2px;">XQuery Function Reference</div>
      </td>
	      </tr>
     <tr valign="top">
		<td colspan="3" width="100%" align="left" height="100%">
     <div><img src="images/varspace.gif" alt="" width="598" height="1"></div>
  <table width="100%" align="center" cellpadding="4" cellspacing="1">
    <tbody><tr valign="top">
		      <td>
      <table width="100%">
      <tbody><tr align="center">
			    <td><br>
      <font size="+1"><b>
      Module: SpreadsheetML Support
      </b><br></font>
      <br>
      </td>
			  </tr>
 <tr>
			    <td style="font-family: arial; font-size: 10pt;">

      <p>The SpreadsheetML function module is installed as the following 
		  file:</p>
    <ul>
				<li><code><em>install_dir</em>/Modules/MarkLogic/openxml/spreadsheet-ml-support.xqy</code></li>
			      </ul>
    <p>where <code><em>install_dir</em></code> is the directory in which 
	    MarkLogic Server is installed.</p>
    <p>To use the <code>spreadsheet-ml-support.xqy</code> module in your own 
    XQuery modules, 
    include the following line in your XQuery prolog:</p>
    <p><code>import module namespace excel="http://marklogic.com/openxml/excel" 
		    at "/MarkLogic/MarkLogic/openxml/spreadsheet-ml-support.xqy"</code></p>
    <p>The SpreadsheetML functions are used to manipulate Microsoft Office
    Open XML documents.</p>
<p><font size="+1"><b>Pieces required for creating a .xlsx</b></font><p>

    <p>Below are functions for manipulating the XML files from Excel 2007 documents which have been extracted from their .xlsx package.  Also provided <br/>are functions for the dynamic generation of complete workbooks (a .xlsx package) and their requisite related parts.  Some details on standard and enhanced .xlsx packages follows.</p>
<p>The required files for a standard minimum .xlsx, a workbook, with just worksheets, and no tables (tables manifest as NamedRanges/AutoFiltering/Styles in Excel), requires the pieces detailed<br/> in Table1 below.  In Table2 on the right are details for the pieces required when adding Excel tables to the .xlsx.  In the right column of each table we've noted which functions can assist in generating these parts.</p>
<table cellpadding="4" cellspacing="1" align="left">
<tr><td>
<table  class="table-line" bgcolor="#000000" cellpadding="4" cellspacing="1" >
<tr>
<td><b>.xlsx package</b></td>
<td><b>SpreadsheetML function</b></td>
</tr>
<tr>
<td>[Content_Types].xml</td>
<td> <a href="#excel:content-types"><b>
            excel:content-types
            </b></a></td>
</tr>
<tr>
<td>_rels/.rels</td>
<td><a href="#excel:package-rels"><b>
            excel:package-rels
            </b></a></td>
</tr>
<tr>
<td>xl/workbook.xml</td>
<td>          <a href="#excel:workbook"><b>
            excel:workbook
            </b></a></td>
</tr>
<tr>
<td>xl/_rels/workbook.xml.rels</td>
<td>          <a href="#excel:workbook-rels"><b>
            excel:workbook-rels
            </b></a></td>
</tr>
<tr>
<td>xl/worksheets/sheet1.xml,<br/> xl/worksheets/sheet2.xml,<br/>...xl/worksheets/sheetN.xml</td>
<td>  <a href="#excel:worksheet"><b>
            excel:worksheet
            </b></a> 
         </td>
</tr>
<tr><td>&nbsp;</td></tr>
<tr><td>&nbsp;<br/><br/><br/><br/><br/></td></tr>
<tr><td><b><i>Table 1</i></b></td></tr>
</table> 
</td>
<td>
<table  class="table-line" bgcolor="#000000" cellpadding="4" cellspacing="1" >
<tr>
<td><b>.xlsx package</b></td>
<td><b>SpreadsheetML function</b></td>
</tr>
<tr>
<td>[Content_Types].xml</td>
<td> <a href="#excel:content-types"><b>
            excel:content-types
            </b></a></td>
</tr>
<tr>
<td>_rels/.rels</td>
<td><a href="#excel:package-rels"><b>
            excel:package-rels
            </b></a></td>
</tr>
<tr>
<td>xl/workbook.xml</td>
<td>          <a href="#excel:workbook"><b>
            excel:workbook
            </b></a></td>
</tr>
<tr>
<td>xl/_rels/workbook.xml.rels</td>
<td>          <a href="#excel:workbook-rels"><b>
            excel:workbook-rels
            </b></a></td>
</tr>
<tr>
<td>xl/worksheets/sheet1.xml,<br/> xl/worksheets/sheet2.xml,<br/>...xl/worksheets/sheetN.xml</td>
<td>  <a href="#excel:worksheet"><b>
            excel:worksheet
            </b></a> 
         </td>
</tr>
<tr>
<td>xl/worksheets/_rels/sheet1.xml.rels,<br/>xl/worksheets/_rels/sheet2.xml.rels,<br/>...xl/worksheets/_rels/sheetN.xml.rels</td>
<td>  <a href="#excel:worksheet-rels"><b>
            excel:worksheet-rels
            </b></a> 
         </td>
</tr>
<tr>
<td>xl/tables/table1.xml,<br/>xl/tables/table2.xml<br/>,...xl/tables/tableN.xml</td>
<td>  <a href="#excel:table"><b>
            excel:table
            </b></a> 
         </td>
</tr>
<tr><td><b><i>Table 2</i><b></td></tr>
</table>
</td>
</tr>
</table>

    </td>
			  </tr>
</tbody></table>
<p><i>Note: Each worksheet will have its own file, sheet1.xml, sheet2.xml to sheetN.xml.  The number of sheets and their relationships must be accounted for in [Content_Types].xml, workbook.xml, and workbook.xml.rels.  <br/>When adding tables, each table has its own file as well: table1.xml, table2.xml, to tableN.xml.  Each table is mapped to a sheet#.xml.rels, where each sheet has its own single relationships file for relating the tables to the sheet.  <br/>If no table is related to the sheet, sheet#.xml.rels file is Not required for that sheet.
</td>
		    </tr>
   
  <tr>
		      <td>
      <table class="table-line" width="100%" align="center" bgcolor="#000000" cellpadding="4" cellspacing="1">
      <tbody><tr bgcolor="#f2ebce">
			    <td colspan="10">
          <font size="+1"><b>Function Summary</b></font>
        </td>
			  </tr>
      <tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#excel:a1-column"><b>
            excel:a1-column
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function returns the column letter from A1 notation cell reference.
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#excel:a1-row"><b>
            excel:a1-row
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function returns the row number from A1 notation cell reference.
          </td>
			  </tr>
<tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#excel:a1-to-r1c1"><b>
            excel:a1-to-r1c1
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
This function converts the cell coordinate in A1 notation to R1C1 notation (row/column notation).
          </td>
			  </tr>









<tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#excel:cell"><b>
            excel:cell
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function creates a cell.
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#excel:cell-string-value"><b>
            excel:cell-string-value
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function returns the text values for the cells, mapping their values from the sharedStrings table.
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#excel:column-width"><b>
            excel:column-width
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function creates the ms:cols element, which can be added to a worksheet to define custom column widths.
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#excel:content-types"><b>
            excel:content-types
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function creates a content types element for the .xlsx package ([Content_Types].xml).
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#excel:create-row"><b>
            excel:create-row
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function creates a row populated with cells, the values of which are passed in with the parameter sequence. 
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#excel:create-row2"><b>
            excel:create-row
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function creates a row populated with cells, the values of which are passed in with the map parameter. 
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#excel:create-simple-xlsx"><b>
            excel:create-simple-xlsx
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function creates a .zip file that is a .xlsx package containing the minimum parts required to be a valid package.
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#excel:create-xlsx-from-xml-table"><b>
            excel:create-xlsx-from-xml-table
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function will attempt to generate an Excel workbook from an XML table.
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#excel:directory-to-filename"><b>
            excel:directory-to-filename
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function converts the directory name, to the name of the .xlsx package.
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#excel:directory-uris"><b>
            excel:directory-uris
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function returns the URIs for files extracted from .xlsx package using Open XML Extract pipeline.
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#excel:get-mimetype"><b>
            excel:get-mimetype
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function returns the mimetype for the given URI.
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#excel:gregorian-to-julian"><b>
            excel:gregorian-to-julian
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function converts a gregorian date to an Excel julian day.
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#excel:julian-to-gregorian"><b>
            excel:julian-to-gregorian
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function converts and Excel julian day number to a gregorian date.
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#excel:map-shared-strings"><b>
            excel:map-shared-strings
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
This function dereferences cell text values so text is stored within
the worksheet, instead of just a reference sharedStrings table. </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#excel:package-rels"><b>
            excel:package-rels
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function creates a package relationships element for the .xlsx package (_rels/.rels).
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#excel:r1c1-to-a1"><b>
            excel:r1c1-to-a1
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
This function converts the row and column numbers from R1C1 notation (row/column notation) to the preferred A1
notation. </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#excel:row"><b>
            excel:row
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function creates a worksheet row.
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#excel:set-cells"><b>
            excel:set-cells
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function sets the cells within the provided worksheet.
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#excel:sharedstring-uri"><b>
            excel:sharedstring-uri
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function returns the URI for the sharedString table, extracted from .xlsx using Open XML Extract pipeline.
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#excel:sheet-uris"><b>
            excel:sheet-uris
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function returns only the worksheet URIs for files extracted from .xlsx package using Open XML Extract pipeline.
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#excel:table"><b>
            excel:table
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function creates a table element for a .xlsx package (xl/tables/table#.xml).
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#excel:workbook"><b>
            excel:workbook
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function creates a workbook element for the .xlsx package (xl/workbook.xml) .
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#excel:workbook-rels"><b>
            excel:workbook-rels
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function creates a workbook relationships element for the .xlsx package (xl/_rels/workbook.xml.rels).
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#excel:workbook-sheet-names"><b>
            excel:workbook-sheet-names
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function returns the iworksheet names for the workbook.
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#excel:worksheet"><b>
            excel:worksheet
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function creates a worksheet for the .xlsx package (xl/worksheets/sheet#.xml).
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#excel:worksheet-rels"><b>
            excel:worksheet-rels
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function createts a worksheet relationships element for a .xlsx package (xl/worksheets/_rels/sheet#.xml.rels).
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#excel:xlsx-package"><b>
            excel:xlsx-package
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function creates a .zip file that is the .xlsx package containing the parts passed in as parameters.
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#excel:xlsx-manifest"><b>
            excel:xlsx-manifest
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function constructs a manifest for the given URIs in the directory.
          </td>
			  </tr>
      </tbody></table>
      </td>
		    </tr><tr>
		      <td><img src="images/varspace.gif" height="10"></td>
		    </tr><tr>
		      <td>
      <table class="table-line" width="100%" align="right" bgcolor="#000000" cellpadding="4" cellspacing="1">
      <tbody><tr bgcolor="#f2ebce">
			    <td colspan="10">
          <font size="+1"><b>Function Detail</b></font>
        </td>
			  </tr>
      <tr class="mainbody">
			    <td>
       <table class="mainbody" width="100%" border="0" cellpadding="0" cellspacing="0">

        <tbody><tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12">
      </td>
				</tr>

        <tr class="mainbody">
				  <td>

            <table>
            <tbody><tr>
					<td colspan="2" style="font-size: 12pt; font-family: Courier;">
                 <a id="excel:a1-column"></a><b><font color="#c00831">
                 excel:a1-column</font></b>(
                    </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      $a1 as xs:string
                      </td>
				      </tr><tr>
					<td colspan="2" style="font-size: 11pt; font-family: Courier;">)&nbsp; as &nbsp;xs:string</td>
				      </tr>
            </tbody></table>

          </td>
				</tr>

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12"></td>
				</tr>

        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
          <img src="images/varspace.gif" width="8">
          <b>Summary:</b>
          <div style="margin-left: 0.5in; margin-right: 8px; font-family: arial; font-size: 10pt;"> <br>
            This function returns the column letter from A1 notation cell reference.
          </div><br>
          </td>
				</tr>
        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
    <img src="images/varspace.gif" width="8">
    <b>Parameters:</b>
      <table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $a1
                   :
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                The cell reference in A1 notation. 
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><br>
    </td>
				</tr>
 
        

        

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" width="8">
            <font style="font-size: 10pt; font-family: Arial;"><b>Example:</b></font>
            <div style="margin-left: 0.5in; margin-right: 8px; font-size: 9pt; font-family: Courier;"> 
            <pre xml:space="preserve">xquery version "1.0-ml";
import module namespace excel= "http://marklogic.com/openxml/excel" 
       at "/MarkLogic/openxml/spreadsheet-ml-support.xqy";
       
excel:a1-column("D23")
=&gt;
D
 
  </pre>
  
            </div>
            </td>
				</tr>

        <tr class="mainbody">
				  <td></td>
				</tr>
        </tbody></table><table class="mainbody" width="100%" border="0" cellpadding="0" cellspacing="0">

        <tbody><tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12">
      <hr class="control-line" size="1"></td>
				</tr>

        <tr class="mainbody">
				  <td>

            <table>
            <tbody><tr>
					<td colspan="2" style="font-size: 12pt; font-family: Courier;">
                 <a id="excel:a1-row"></a><b><font color="#c00831">
                 excel:a1-row</font></b>(
                    </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      $a1 as xs:string
                      </td>
				      </tr><tr>
					<td colspan="2" style="font-size: 11pt; font-family: Courier;">)&nbsp; as &nbsp;xs:string</td>
				      </tr>
            </tbody></table>

          </td>
				</tr>

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12"></td>
				</tr>

        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
          <img src="images/varspace.gif" width="8">
          <b>Summary:</b>
          <div style="margin-left: 0.5in; margin-right: 8px; font-family: arial; font-size: 10pt;"> <br>
            This function returns the row number from A1 notation cell reference.
          </div><br>
          </td>
				</tr>
        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
    <img src="images/varspace.gif" width="8">
    <b>Parameters:</b>
      <table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $a1
                   :
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                The cell reference in A1 notation. 
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><br>
    </td>
				</tr>
 
        

        

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" width="8">
            <font style="font-size: 10pt; font-family: Arial;"><b>Example:</b></font>
            <div style="margin-left: 0.5in; margin-right: 8px; font-size: 9pt; font-family: Courier;"> 
            <pre xml:space="preserve">xquery version "1.0-ml";
import module namespace excel= "http://marklogic.com/openxml/excel" 
       at "/MarkLogic/openxml/spreadsheet-ml-support.xqy";
       
excel:a1-row("D23")
=&gt;
23
       
  </pre>
  
            </div>
            </td>
				</tr>

        <tr class="mainbody">
				  <td></td>
				</tr>
	</tbody></table>




           

        <table class="mainbody" width="100%" border="0" cellpadding="0" cellspacing="0">

        <tbody><tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12">
      <hr class="control-line" size="1"></td>
				</tr>

        <tr class="mainbody">
				  <td>

            <table>
            <tbody><tr>
					<td colspan="2" style="font-size: 12pt; font-family: Courier;">
                 <a id="excel:a1-to-r1c1"></a><b><font color="#c00831">
                 excel:a1-to-r1c1</font></b>(
                    </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                       $a1notation as xs:string 
                      </td>
				      </tr>
				      <tr>
					<td colspan="2" style="font-size: 11pt; font-family: Courier;">)&nbsp; as &nbsp;xs:string</td>
				      </tr>
            </tbody></table>

          </td>
				</tr>

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12"></td>
				</tr>

        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
          <img src="images/varspace.gif" width="8">
          <b>Summary:</b>
          <div style="margin-left: 0.5in; margin-right: 8px; font-family: arial; font-size: 10pt;"> <br>
This function converts the cell coordinate in A1 notation to  R1C1 notation (row/column notation). <br/>Excel's limits for rows is 1048756, and for columns is 16384.
This function returns R1C1 notation for any cell in that range <br/>from A1 to
WID1048576. </div><br>
          </td>
				</tr>
        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
    <img src="images/varspace.gif" width="8">
    <b>Parameters:</b>
      <table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $a1notation
                   :
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 the A1 style coordinate reference.
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table>
         <br>
    </td>
				</tr>
 
        

        

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" width="8">
            <font style="font-size: 10pt; font-family: Arial;"><b>Example:</b></font>
            <div style="margin-left: 0.5in; margin-right: 8px; font-size: 9pt; font-family: Courier;"> 
            <pre xml:space="preserve">xquery version "1.0-ml";
import module namespace excel= "http://marklogic.com/openxml/excel" 
       at "/MarkLogic/openxml/spreadsheet-ml-support.xqy";

excel:a1-to-r1c1("CJL1")
=&gt;
R:1C:2378 
 </pre>
  
            </div>
            </td>
				</tr>

        <tr class="mainbody">
				  <td></td>
				</tr>
        </tbody></table>















<table class="mainbody" width="100%" border="0" cellpadding="0" cellspacing="0">

        <tbody><tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12">
      <hr class="control-line" size="1"></td>
				</tr>

        <tr class="mainbody">
				  <td>

            <table>
            <tbody><tr>
					<td colspan="2" style="font-size: 12pt; font-family: Courier;">
                 <a id="excel:cell"></a><b><font color="#c00831">
                 excel:cell</font></b>(
                    </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      $a1-ref as xs:string, 
                      </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      $value as xs:anyAtomicType?, 
                      </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      [$formula as xs:string?], 
                      </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      [$date-id as xs:integer?]
                      </td>
				      </tr><tr>
					<td colspan="2" style="font-size: 11pt; font-family: Courier;">)&nbsp; as &nbsp;element(ms:c)</td>
				      </tr>
            </tbody></table>

          </td>
				</tr>

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12"></td>
				</tr>

        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
          <img src="images/varspace.gif" width="8">
          <b>Summary:</b>
          <div style="margin-left: 0.5in; margin-right: 8px; font-family: arial; font-size: 10pt;"> <br>
            This function creates a cell.
          </div><br>
          </td>
				</tr>
        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
    <img src="images/varspace.gif" width="8">
    <b>Parameters:</b>
      <table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $a1-ref
                   :
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 The row and column number for the cell provided in A1 notation.
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $value
                   :
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 The cell value, either a number or a string.
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $formula
                   <font style="font-size: 10pt; font-family: Arial;"> 
                       (optional)</font>:
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 The formula for the cell.
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $date-id
                   <font style="font-size: 10pt; font-family: Arial;"> 
                       (optional)</font>:
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 The date style for the cell.
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><br>
    </td>
				</tr>
 
        

        

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" width="8">
            <font style="font-size: 10pt; font-family: Arial;"><b>Example:</b></font>
            <div style="margin-left: 0.5in; margin-right: 8px; font-size: 9pt; font-family: Courier;"> 
            <pre xml:space="preserve">xquery version "1.0-ml";
import module namespace excel= "http://marklogic.com/openxml/excel" 
       at "/MarkLogic/openxml/spreadsheet-ml-support.xqy";
       
excel:cell("A1",123) 
=&gt;
&lt;ms:c r="A1" xmlns:ms="http://schemas.openxmlformats.org/spreadsheetml/2006/main"&gt;
   &lt;ms:v&gt;123&lt;/ms:v&gt;
&lt;/ms:c&gt;


  </pre>
  
            </div>
            </td>
				</tr><tr class="mainbody">
				  <td><img src="images/varspace.gif" width="8">
            <font style="font-size: 10pt; font-family: Arial;"><b>Example:</b></font>
            <div style="margin-left: 0.5in; margin-right: 8px; font-size: 9pt; font-family: Courier;"> 
            <pre xml:space="preserve">xquery version "1.0-ml";
import module namespace excel= "http://marklogic.com/openxml/excel" 
       at "/MarkLogic/openxml/spreadsheet-ml-support.xqy";

excel:cell("A3",(),"SUM(A1:A2)")
=&gt;
&lt;ms:c r="A3" xmlns:ms="http://schemas.openxmlformats.org/spreadsheetml/2006/main"&gt;
   &lt;ms:f&gt;SUM(A1:A2)&lt;/ms:f&gt;
&lt;/ms:c&gt;

Note: 
Above we pass the empty sequence for the value, so only the formula is populated for the cell. 
This way, when the cell is opened within Excel, the value will be generated by the formula and
populated within the cell.  It is possible to create a cell with a value and a formula, where
the value the formula calculates and the value are not equal.  Excel will not automatically correct this disparity
upon consuming the cell.

  </pre>
  
            </div>
            </td>
				</tr><tr class="mainbody">
				  <td><img src="images/varspace.gif" width="8">
            <font style="font-size: 10pt; font-family: Arial;"><b>Example:</b></font>
            <div style="margin-left: 0.5in; margin-right: 8px; font-size: 9pt; font-family: Courier;"> 
            <pre xml:space="preserve">xquery version "1.0-ml";
import module namespace excel= "http://marklogic.com/openxml/excel" 
       at "/MarkLogic/openxml/spreadsheet-ml-support.xqy";

excel:cell("A3",32999,(),0)
=&gt;
&lt;ms:c r="A3" s="0" xmlns:ms="http://schemas.openxmlformats.org/spreadsheetml/2006/main"&gt;
   &lt;ms:v&gt;32999&lt;/ms:v&gt;
&lt;/ms:c&gt;

Note:
Formula and date style assignment only applies to cells containing numeric values. 
Formula and date style assignment will be ignored in the case that $value is of type xs:string.


  </pre>
  
            </div>
            </td>
				</tr>

        <tr class="mainbody">
				  <td></td>
				</tr>
        </tbody></table><table class="mainbody" width="100%" border="0" cellpadding="0" cellspacing="0">

        <tbody><tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12">
      <hr class="control-line" size="1"></td>
				</tr>

        <tr class="mainbody">
				  <td>

            <table>
            <tbody><tr>
					<td colspan="2" style="font-size: 12pt; font-family: Courier;">
                 <a id="excel:cell-string-value"></a><b><font color="#c00831">
                 excel:cell-string-value</font></b>(
                    </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      $cells as element(ms:c)*, 
                      </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      $shared-strings as element(ms:sst)
                      </td>
				      </tr><tr>
					<td colspan="2" style="font-size: 11pt; font-family: Courier;">)&nbsp; as &nbsp;xs:string*</td>
				      </tr>
            </tbody></table>

          </td>
				</tr>

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12"></td>
				</tr>

        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
          <img src="images/varspace.gif" width="8">
          <b>Summary:</b>
          <div style="margin-left: 0.5in; margin-right: 8px; font-family: arial; font-size: 10pt;"> <br>
This function returns the text values for the cells, mapping their
values from the sharedStrings table. Cell values that are numbers will
be returned as text. </div><br>
          </td>
				</tr>
        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
    <img src="images/varspace.gif" width="8">
    <b>Parameters:</b>
      <table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $cells
                   :
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 The cells from the worksheet.
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $shared-strings
                   :
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 The sharedStrings table.
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><br>
    </td>
				</tr>
 
        

        

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" width="8">
            <font style="font-size: 10pt; font-family: Arial;"><b>Example:</b></font>
            <div style="margin-left: 0.5in; margin-right: 8px; font-size: 9pt; font-family: Courier;"> 
            <pre xml:space="preserve">xquery version "1.0-ml";
import module namespace excel= "http://marklogic.com/openxml/excel" 
       at "/MarkLogic/openxml/spreadsheet-ml-support.xqy";
declare namespace ms="http://schemas.openxmlformats.org/spreadsheetml/2006/main";

let $dir := "/Default_xlsx_parts/"
let $ss := fn:doc(excel:sharedstring-uri($dir))/node()
let $cels := (&lt;ms:c&gt;
                &lt;ms:v&gt;1&lt;/ms:v&gt;
              &lt;/ms:c&gt;,
              &lt;ms:c t="s"&gt;
                &lt;ms:v&gt;1&lt;/ms:v&gt;
              &lt;/ms:c&gt;)
return excel:cell-string-value ($cels,$ss)

1
TEST
 </pre>
  
            </div>
            </td>
				</tr>

        <tr class="mainbody">
				  <td></td>
				</tr>
        </tbody></table><table class="mainbody" width="100%" border="0" cellpadding="0" cellspacing="0">

        <tbody><tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12">
      <hr class="control-line" size="1"></td>
				</tr>

        <tr class="mainbody">
				  <td>

            <table>
            <tbody><tr>
					<td colspan="2" style="font-size: 12pt; font-family: Courier;">
                 <a id="excel:column-width"></a><b><font color="#c00831">
                 excel:column-width</font></b>(
                    </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      $widths as xs:integer+
                      </td>
				      </tr><tr>
					<td colspan="2" style="font-size: 11pt; font-family: Courier;">)&nbsp; as &nbsp;element(ms:cols)</td>
				      </tr>
            </tbody></table>

          </td>
				</tr>

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12"></td>
				</tr>

        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
          <img src="images/varspace.gif" width="8">
          <b>Summary:</b>
          <div style="margin-left: 0.5in; margin-right: 8px; font-family: arial; font-size: 10pt;"> <br>
            This function creates the ms:cols element, which can be added to a worksheet to define custom column widths. 
          </div><br>
          </td>
				</tr>
        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
    <img src="images/varspace.gif" width="8">
    <b>Parameters:</b>
      <table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $widths
                   :
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
A sequence of column widths. It is assumed that the column widths are
set by the order of the items in the sequence. </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><br>
    </td>
				</tr>
 
        

        

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" width="8">
            <font style="font-size: 10pt; font-family: Arial;"><b>Example:</b></font>
            <div style="margin-left: 0.5in; margin-right: 8px; font-size: 9pt; font-family: Courier;"> 
            <pre xml:space="preserve">xquery version "1.0-ml";
import module namespace excel= "http://marklogic.com/openxml/excel" 
       at "/MarkLogic/openxml/spreadsheet-ml-support.xqy";

excel:column-width((15,15,15))
=&gt;
&lt;ms:cols xmlns:ms="http://schemas.openxmlformats.org/spreadsheetml/2006/main"&gt;
   &lt;ms:col min="1" max="1" width="15" customWidth="1"/&gt;
   &lt;ms:col min="2" max="2" width="15" customWidth="1"/&gt;
   &lt;ms:col min="3" max="3" width="15" customWidth="1"/&gt;
&lt;/ms:cols&gt;


  </pre>
  
            </div>
            </td>
				</tr>

        <tr class="mainbody">
				  <td></td>
				</tr>
        </tbody></table><table class="mainbody" width="100%" border="0" cellpadding="0" cellspacing="0">

        <tbody><tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12">
      <hr class="control-line" size="1"></td>
				</tr>

        <tr class="mainbody">
				  <td>

            <table>
            <tbody><tr>
					<td colspan="2" style="font-size: 12pt; font-family: Courier;">
                 <a id="excel:content-types"></a><b><font color="#c00831">
                 excel:content-types</font></b>(
                    </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      $worksheet-count as xs:integer, 
                      </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      [$tbl-count as xs:integer]
                      </td>
				      </tr><tr>
					<td colspan="2" style="font-size: 11pt; font-family: Courier;">)&nbsp; as &nbsp;element(types:Types)</td>
				      </tr>
            </tbody></table>

          </td>
				</tr>

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12"></td>
				</tr>

        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
          <img src="images/varspace.gif" width="8">
          <b>Summary:</b>
          <div style="margin-left: 0.5in; margin-right: 8px; font-family: arial; font-size: 10pt;"> <br>
            This function creates a content types element for the .xlsx package ([Content_Types].xml)
          </div><br>
          </td>
				</tr>
        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
    <img src="images/varspace.gif" width="8">
    <b>Parameters:</b>
      <table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $worksheet-count
                   :
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 The number of worksheets in the .xlsx package.
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $tbl-count
                   <font style="font-size: 10pt; font-family: Arial;"> 
                       (optional)</font>:
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 The number ot tablles in the .xlsx package
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><br>
    </td>
				</tr>
 
        

        

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" width="8">
            <font style="font-size: 10pt; font-family: Arial;"><b>Example:</b></font>
            <div style="margin-left: 0.5in; margin-right: 8px; font-size: 9pt; font-family: Courier;"> 
            <pre xml:space="preserve">		    
xquery version "1.0-ml"; 
import module namespace excel= "http://marklogic.com/openxml/excel" 
       at "/MarkLogic/openxml/spreadsheet-ml-support.xqy";
       
excel:content-types(3) 
=&gt;
&lt;Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"&gt;
   &lt;Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/&gt;
   &lt;Default Extension="xml" ContentType="application/xml"/&gt;
   &lt;Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"/&gt;
   &lt;Override PartName="/xl/worksheets/sheet1" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"/&gt;
   &lt;Override PartName="/xl/worksheets/sheet2" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"/&gt;
   &lt;Override PartName="/xl/worksheets/sheet3" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"/&gt;
&lt;/Types&gt;

 </pre>
  
            </div>
            </td>
				</tr><tr class="mainbody">
				  <td><img src="images/varspace.gif" width="8">
            <font style="font-size: 10pt; font-family: Arial;"><b>Example:</b></font>
            <div style="margin-left: 0.5in; margin-right: 8px; font-size: 9pt; font-family: Courier;"> 
            <pre xml:space="preserve">		    
xquery version "1.0-ml";
import module namespace excel= "http://marklogic.com/openxml/excel" 
       at "/MarkLogic/openxml/spreadsheet-ml-support.xqy";
       
excel:content-types(1,1)
=&gt;
&lt;Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"&gt;
   &lt;Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/&gt;
   &lt;Default Extension="xml" ContentType="application/xml"/&gt;
   &lt;Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"/&gt;
   &lt;Override PartName="/xl/worksheets/sheet1" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"/&gt;
   &lt;Override PartName="/xl/tables/table1.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"/&gt;
&lt;/Types&gt;
      
 </pre>
  
            </div>
            </td>
				</tr>

        <tr class="mainbody">
				  <td></td>
				</tr>
        </tbody></table><table class="mainbody" width="100%" border="0" cellpadding="0" cellspacing="0">

        <tbody><tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12">
      <hr class="control-line" size="1"></td>
				</tr>

        <tr class="mainbody">
				  <td>

            <table>
            <tbody><tr>
					<td colspan="2" style="font-size: 12pt; font-family: Courier;">
                 <a id="excel:create-row"></a><b><font color="#c00831">
                 excel:create-row</font></b>(
                    </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      $values as xs:anyAtomicType*
                      </td>
				      </tr><tr>
					<td colspan="2" style="font-size: 11pt; font-family: Courier;">)&nbsp; as &nbsp;element(ms:row)</td>
				      </tr>
            </tbody></table>

          </td>
				</tr>

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12"></td>
				</tr>

        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
          <img src="images/varspace.gif" width="8">
          <b>Summary:</b>
          <div style="margin-left: 0.5in; margin-right: 8px; font-family: arial; font-size: 10pt;"> <br>
This function creates a row populated with cells, the values of which are passed in with the parameter sequence. The cell's values
are either a number type or of type string. <br/>This function creates a simple row, containing simple cells;
there is no way to set row number explicitly, and there is no way to
set cell row/column position. It is assumed that the cells <br/>are
populated in the row in the order that they are passed to the function.
</div><br>
          </td>
				</tr>
        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
    <img src="images/varspace.gif" width="8">
    <b>Parameters:</b>
      <table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $values
                   :
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 number or string values that will be used as values for cells populated within row.
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><br>
    </td>
				</tr>
 
        

        

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" width="8">
            <font style="font-size: 10pt; font-family: Arial;"><b>Example:</b></font>
            <div style="margin-left: 0.5in; margin-right: 8px; font-size: 9pt; font-family: Courier;"> 
            <pre xml:space="preserve">xquery version "1.0-ml"; 
import module namespace excel= "http://marklogic.com/openxml/excel" 
       at "/MarkLogic/openxml/spreadsheet-ml-support.xqy";
       
let $vals :=(1,2,3,"TEST")
return excel:create-row($vals)
=&gt;
&lt;ms:row xmlns:ms="http://schemas.openxmlformats.org/spreadsheetml/2006/main"&gt;
   &lt;ms:c&gt;&lt;ms:v&gt;1&lt;/ms:v&gt;&lt;/ms:c&gt;
   &lt;ms:c&gt;&lt;ms:v&gt;2&lt;/ms:v&gt;&lt;/ms:c&gt;
   &lt;ms:c&gt;&lt;ms:v&gt;3&lt;/ms:v&gt;&lt;/ms:c&gt;
   &lt;ms:c t="inlineStr"&gt;&lt;ms:is&gt;&lt;ms:t&gt;TEST&lt;/ms:t&gt;&lt;/ms:is&gt;&lt;/ms:c&gt;
&lt;/ms:row&gt;


       
  </pre>
  
            </div>
            </td>
				</tr>

        <tr class="mainbody">
				  <td></td>
				</tr>
        </tbody></table><table class="mainbody" width="100%" border="0" cellpadding="0" cellspacing="0">

        <tbody><tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12">
      <hr class="control-line" size="1"></td>
				</tr>

        <tr class="mainbody">
				  <td>

            <table>
            <tbody><tr>
					<td colspan="2" style="font-size: 12pt; font-family: Courier;">
                 <a id="excel:create-row2"></a><b><font color="#c00831">
                 excel:create-row</font></b>(
                    </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      $map as map:map, 
                      </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      $keys as xs:string*
                      </td>
				      </tr><tr>
					<td colspan="2" style="font-size: 11pt; font-family: Courier;">)&nbsp; as &nbsp;element(ms:row)</td>
				      </tr>
            </tbody></table>

          </td>
				</tr>

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12"></td>
				</tr>

        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
          <img src="images/varspace.gif" width="8">
          <b>Summary:</b>
          <div style="margin-left: 0.5in; margin-right: 8px; font-family: arial; font-size: 10pt;"> <br>
This function creates a row populated with cells, the values of which are passed in with the map parameter. The cell's values
are either a number or of type string. This function creates a simple row, <br/>with simple cells; there
is no way to set row number explicitly, and there is no way to set cell
row/column position. It is assumed that the cells are populated in the
row in the order that they are passed <br/>to the function within the map.
Keys are passed separately as you may have more keys than are contained
within the map, this is done for sparsely populated tables. If the key
doesn't exist within <br/>the map, the cell will be created but will not
contain any value. </div><br>
          </td>
				</tr>
        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
    <img src="images/varspace.gif" width="8">
    <b>Parameters:</b>
      <table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $map
                   :
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 Map containing values to be used for cell values within row.
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $keys
                   :
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 Keys to be used for column values.  If key doesn't exist within map, an empty cell will be created.
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><br>
    </td>
				</tr>
 
        

        

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" width="8">
            <font style="font-size: 10pt; font-family: Arial;"><b>Example:</b></font>
            <div style="margin-left: 0.5in; margin-right: 8px; font-size: 9pt; font-family: Courier;"> 
            <pre xml:space="preserve">xquery version "1.0-ml";
import module namespace excel= "http://marklogic.com/openxml/excel" 
       at "/MarkLogic/openxml/spreadsheet-ml-support.xqy";
       
let $map := map:map()
let $put := (map:put($map, "RequestID",45683),
             map:put($map, "Customer","Pete"))

let $keys := ("Customer","Address","RequestID")
return excel:create-row($map,$keys)
=&gt;
&lt;ms:row xmlns:ms="http://schemas.openxmlformats.org/spreadsheetml/2006/main"&gt;
   &lt;ms:c t="inlineStr"&gt;&lt;ms:is&gt;&lt;ms:t&gt;Pete&lt;/ms:t&gt;&lt;/ms:is&gt;&lt;/ms:c&gt;
   &lt;ms:c t="inlineStr"&gt;&lt;ms:is&gt;&lt;ms:t/&gt;&lt;/ms:is&gt;&lt;/ms:c&gt;
   &lt;ms:c&gt;&lt;ms:v&gt;45683&lt;/ms:v&gt;&lt;/ms:c&gt;
&lt;/ms:row&gt;

       
  </pre>
  
            </div>
            </td>
				</tr>

        <tr class="mainbody">
				  <td></td>
				</tr>
        </tbody></table><table class="mainbody" width="100%" border="0" cellpadding="0" cellspacing="0">

        <tbody><tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12">
      <hr class="control-line" size="1"></td>
				</tr>

        <tr class="mainbody">
				  <td>

            <table>
            <tbody><tr>
					<td colspan="2" style="font-size: 12pt; font-family: Courier;">
                 <a id="excel:create-simple-xlsx"></a><b><font color="#c00831">
                 excel:create-simple-xlsx</font></b>(
                    </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      $worksheets as element(ms:worksheet)*
                      </td>
				      </tr><tr>
					<td colspan="2" style="font-size: 11pt; font-family: Courier;">)&nbsp; as &nbsp;binary()</td>
				      </tr>
            </tbody></table>

          </td>
				</tr>

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12"></td>
				</tr>

        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
          <img src="images/varspace.gif" width="8">
          <b>Summary:</b>
          <div style="margin-left: 0.5in; margin-right: 8px; font-family: arial; font-size: 10pt;"> <br>
This function creates a .zip file that is a .xlsx package containing
the minimum parts required to be a valid package. The parts include:
[Content_Types].xml, .rels, workbook.xml, <br/>workbook.xml.rels, and the
sheets. Sheets are saved as sheet1.xml, sheet2.xml... to sheetN.xml.
Pass the sheets into the function in the order you'd like them to be
displayed in the workbook. </div><br>
          </td>
				</tr>
        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
    <img src="images/varspace.gif" width="8">
    <b>Parameters:</b>
      <table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $worksheets
                   :
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 The worksheets to be used with the new workbook (.xlsx)
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><br>
    </td>
				</tr>
 
        

        

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" width="8">
            <font style="font-size: 10pt; font-family: Arial;"><b>Example:</b></font>
            <div style="margin-left: 0.5in; margin-right: 8px; font-size: 9pt; font-family: Courier;"> 
            <pre xml:space="preserve">xquery version "1.0-ml";
import module namespace excel= "http://marklogic.com/openxml/excel" 
       at "/MarkLogic/openxml/spreadsheet-ml-support.xqy";
declare namespace ms = "http://schemas.openxmlformats.org/spreadsheetml/2006/main";

let $ws:= (&lt;ms:worksheet&gt;
                &lt;ms:sheetData&gt;
                 &lt;ms:row&gt;
                   &lt;ms:c t="s"&gt;
                   &lt;ms:v&gt;1&lt;/ms:v&gt;
                 &lt;/ms:c&gt;
                &lt;/ms:row&gt;
               &lt;/ms:sheetData&gt;
            &lt;/ms:worksheet&gt;)
return xdmp:zip-manifest(excel:create-simple-xlsx($ws))
=&gt;
&lt;parts xmlns="xdmp:zip"&gt;
  &lt;part uncompressed-size="499" compressed-size="218" encrypted="false"&gt;[Content_Types].xml&lt;/part&gt;
  &lt;part uncompressed-size="229" compressed-size="146" encrypted="false"&gt;xl/workbook.xml&lt;/part&gt;
  &lt;part uncompressed-size="241" compressed-size="140" encrypted="false"&gt;_rels/.rels&lt;/part&gt;
  &lt;part uncompressed-size="242" compressed-size="144" encrypted="false"&gt;xl/_rels/workbook.xml.rels&lt;/part&gt;
  &lt;part uncompressed-size="178" compressed-size="119" encrypted="false"&gt;xl/worksheets/sheet1.xml&lt;/part&gt;
&lt;/parts&gt;

 </pre>
  
            </div>
            </td>
				</tr>

        <tr class="mainbody">
				  <td></td>
				</tr>
        </tbody></table><table class="mainbody" width="100%" border="0" cellpadding="0" cellspacing="0">

        <tbody><tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12">
      <hr class="control-line" size="1"></td>
				</tr>

        <tr class="mainbody">
				  <td>

            <table>
            <tbody><tr>
					<td colspan="2" style="font-size: 12pt; font-family: Courier;">
                 <a id="excel:create-xlsx-from-xml-table"></a><b><font color="#c00831">
                 excel:create-xlsx-from-xml-table</font></b>(
                    </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      $original-xml as node(), 
                      </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      [$col-cust-width as xs:integer?], 
                      </td>
				      </tr>
<tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      [$auto-filter as xs:boolean?]
                      </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      [$tbl-style as xs:boolean?]
                      </td>
				      </tr><tr>
					<td colspan="2" style="font-size: 11pt; font-family: Courier;">)&nbsp; as &nbsp;binary()?</td>
				      </tr>
            </tbody></table>

          </td>
				</tr>

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12"></td>
				</tr>

        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
          <img src="images/varspace.gif" width="8">
          <b>Summary:</b>
          <div style="margin-left: 0.5in; margin-right: 8px; font-family: arial; font-size: 10pt;"> <br>
This function will attempt to generate an Excel workbook from an XML
table. An XML table here is defined as a single wrapper element, with a
single repeating child element. <br/>The children elements of this repeating
element may vary in name and number. The list of distinct names of all the children elements will be
used as headers for columns, and <br/>their values will populate rows. It is
possible for the children to have different element names, so its
possible to generate a sparsely populated table. If the xlsx <br/>is not able to be created, and empty sequence is returned.</div><br>
          </td>
				</tr>
        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
    <img src="images/varspace.gif" width="8">
    <b>Parameters:</b>
      <table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $original-xml
                   :
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 The XML to be converted.
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $col-cust-width
                   :
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 A custom width for the columns in the worksheet.
                 </font>
                 </div> 
            </td>
				      </tr>
	 </tbody></table>
<table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $auto-filter
                   :
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 If true, columns will have auto-filter enabled. 
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table>
<table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $tbl-style
                   :
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 If true, then the table will have style TableStyleMedium10 applied.
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><br>
    </td>
				</tr>
 
        

        

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" width="8">
            <font style="font-size: 10pt; font-family: Arial;"><b>Example:</b></font>
            <div style="margin-left: 0.5in; margin-right: 8px; font-size: 9pt; font-family: Courier;"> 
            <pre xml:space="preserve">xquery version "1.0-ml";		    
import module namespace excel= "http://marklogic.com/openxml/excel" 
at "/MarkLogic/openxml/spreadsheet-ml-support.xqy";
       
let $xml := &lt;catalog&gt;
              &lt;item&gt;
                 &lt;product&gt;beach ball&lt;/product&gt;
                 &lt;sku&gt;123123&lt;/sku&gt;
              &lt;/item&gt;
              &lt;item&gt;
                 &lt;product&gt;swim fins&lt;/product&gt;
                 &lt;sku&gt;444444&lt;/sku&gt;
              &lt;/item&gt;
              &lt;item&gt;
                 &lt;product&gt;scuba glasses&lt;/product&gt;
                 &lt;sku&gt;888&lt;/sku&gt;
              &lt;/item&gt;
             &lt;/catalog&gt;
let $package := excel:create-xlsx-from-xml-table($xml,"15",fn:true())
return xdmp:zip-manifest($package)
=&gt;
&lt;parts xmlns="xdmp:zip"&gt;
  &lt;part uncompressed-size="627" compressed-size="232" encrypted="false"&gt;[Content_Types].xml&lt;/part&gt;
  &lt;part uncompressed-size="229" compressed-size="146" encrypted="false"&gt;xl/workbook.xml&lt;/part&gt;
  &lt;part uncompressed-size="241" compressed-size="140" encrypted="false"&gt;_rels/.rels&lt;/part&gt;
  &lt;part uncompressed-size="242" compressed-size="144" encrypted="false"&gt;xl/_rels/workbook.xml.rels&lt;/part&gt;
  &lt;part uncompressed-size="1034" compressed-size="297" encrypted="false"&gt;xl/worksheets/sheet1.xml&lt;/part&gt;
  &lt;part uncompressed-size="237" compressed-size="141" encrypted="false"&gt;xl/worksheets/_rels/sheet1.xml.rels&lt;/part&gt;
  &lt;part uncompressed-size="410" compressed-size="229" encrypted="false"&gt;xl/tables/table1.xml&lt;/part&gt;
&lt;/parts&gt;

       
  </pre>
  
            </div>
            </td>
				</tr><tr class="mainbody">
				  <td><img src="images/varspace.gif" width="8">
            <font style="font-size: 10pt; font-family: Arial;"><b>Example:</b></font>
            <div style="margin-left: 0.5in; margin-right: 8px; font-size: 9pt; font-family: Courier;"> 
            <pre xml:space="preserve">xquery version "1.0-ml";		  
import module namespace excel= "http://marklogic.com/openxml/excel" 
at "/MarkLogic/openxml/spreadsheet-ml-support.xqy";


let $xml := &lt;catalog&gt;
              &lt;item&gt;
                 &lt;product&gt;beach ball&lt;/product&gt;
                 &lt;sku&gt;123123&lt;/sku&gt;
              &lt;/item&gt;
              &lt;item&gt;
                 &lt;product&gt;swim fins&lt;/product&gt;
                 &lt;sku&gt;444444&lt;/sku&gt;
              &lt;/item&gt;
              &lt;item&gt;
                 &lt;product&gt;scuba glasses&lt;/product&gt;
                 &lt;sku&gt;888&lt;/sku&gt;
              &lt;/item&gt;
             &lt;/catalog&gt;

let $package := excel:create-xlsx-from-xml-table($xml,"15",xs:boolean("true"))
let $doc := xdmp:zip-get($package,"xl/worksheets/sheet1.xml")
return $doc
=&gt;
&lt;worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"&gt;
   &lt;cols xmlns:ms="http://schemas.openxmlformats.org/spreadsheetml/2006/main"&gt;
      &lt;col min="1" max="1" width="15" customWidth="1"/&gt;
      &lt;col min="2" max="2" width="15" customWidth="1"/&gt;
   &lt;/cols&gt;
   &lt;sheetData&gt;
      &lt;row xmlns:ms="http://schemas.openxmlformats.org/spreadsheetml/2006/main"&gt;
         &lt;c t="inlineStr"&gt;&lt;is&gt;&lt;t&gt;product&lt;/t&gt;&lt;/is&gt;&lt;/c&gt;
         &lt;c t="inlineStr"&gt;&lt;is&gt;&lt;t&gt;sku&lt;/t&gt;&lt;/is&gt;&lt;/c&gt;
      &lt;/row&gt;
      &lt;row xmlns:ms="http://schemas.openxmlformats.org/spreadsheetml/2006/main"&gt;
	 &lt;c t="inlineStr"&gt;&lt;is&gt;&lt;t&gt;beach ball&lt;/t&gt;&lt;/is&gt;&lt;/c&gt;
	 &lt;c&gt;&lt;v&gt;123123&lt;/v&gt;&lt;/c&gt;
      &lt;/row&gt;
      &lt;row xmlns:ms="http://schemas.openxmlformats.org/spreadsheetml/2006/main"&gt;
         &lt;c t="inlineStr"&gt;&lt;is&gt;&lt;t&gt;swim fins&lt;/t&gt;&lt;/is&gt;&lt;/c&gt;
         &lt;c&gt;&lt;v&gt;444444&lt;/v&gt;&lt;/c&gt;
      &lt;/row&gt;
      &lt;row xmlns:ms="http://schemas.openxmlformats.org/spreadsheetml/2006/main"&gt;
         &lt;c t="inlineStr"&gt;&lt;is&gt;&lt;t&gt;scuba glasses&lt;/t&gt;&lt;/is&gt;&lt;/c&gt;
	 &lt;c&gt;&lt;v&gt;888&lt;/v&gt;&lt;/c&gt;
      &lt;/row&gt;
   &lt;/sheetData&gt;
   &lt;tableParts count="1"&gt;
      &lt;tablePart r:id="rId1" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"/&gt;
   &lt;/tableParts&gt;
&lt;/worksheet&gt;
       
  </pre>
  
            </div>
            </td>
				</tr>

        <tr class="mainbody">
				  <td></td>
				</tr>
        </tbody></table><table class="mainbody" width="100%" border="0" cellpadding="0" cellspacing="0">

        <tbody><tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12">
      <hr class="control-line" size="1"></td>
				</tr>

        <tr class="mainbody">
				  <td>

            <table>
            <tbody><tr>
					<td colspan="2" style="font-size: 12pt; font-family: Courier;">
                 <a id="excel:directory-to-filename"></a><b><font color="#c00831">
                 excel:directory-to-filename</font></b>(
                    </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      $directory as xs:string
                      </td>
				      </tr><tr>
					<td colspan="2" style="font-size: 11pt; font-family: Courier;">)&nbsp; as &nbsp;xs:string</td>
				      </tr>
            </tbody></table>

          </td>
				</tr>

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12"></td>
				</tr>

        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
          <img src="images/varspace.gif" width="8">
          <b>Summary:</b>
          <div style="margin-left: 0.5in; margin-right: 8px; font-family: arial; font-size: 10pt;"> <br>
            This function converts the directory name, to the name of the .xlsx package.
          </div><br>
          </td>
				</tr>
        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
    <img src="images/varspace.gif" width="8">
    <b>Parameters:</b>
      <table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $directory
                   :
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 The directory name to be converted.
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><br>
    </td>
				</tr>
 
        

        

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" width="8">
            <font style="font-size: 10pt; font-family: Arial;"><b>Example:</b></font>
            <div style="margin-left: 0.5in; margin-right: 8px; font-size: 9pt; font-family: Courier;"> 
            <pre xml:space="preserve">xquery version "1.0-ml"; 
import module namespace excel= "http://marklogic.com/openxml/excel" 
       at "/MarkLogic/openxml/spreadsheet-ml-support.xqy";
       
excel:directory-to-filename("/Default_xlsx_parts/")
=&gt;
Default.xlsx       
       
  </pre>
  
            </div>
            </td>
				</tr>

        <tr class="mainbody">
				  <td></td>
				</tr>
        </tbody></table><table class="mainbody" width="100%" border="0" cellpadding="0" cellspacing="0">

        <tbody><tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12">
      <hr class="control-line" size="1"></td>
				</tr>

        <tr class="mainbody">
				  <td>

            <table>
            <tbody><tr>
					<td colspan="2" style="font-size: 12pt; font-family: Courier;">
                 <a id="excel:directory-uris"></a><b><font color="#c00831">
                 excel:directory-uris</font></b>(
                    </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      $directory as xs:string, 
                      </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      [$includesheets as xs:boolean]
                      </td>
				      </tr><tr>
					<td colspan="2" style="font-size: 11pt; font-family: Courier;">)&nbsp; as &nbsp;xs:string*</td>
				      </tr>
            </tbody></table>

          </td>
				</tr>

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12"></td>
				</tr>

        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
          <img src="images/varspace.gif" width="8">
          <b>Summary:</b>
          <div style="margin-left: 0.5in; margin-right: 8px; font-family: arial; font-size: 10pt;"> <br>
            This function returns the URIs for files extracted from .xlsx package using Open XML Extract pipeline.
          </div><br>
          </td>
				</tr>
        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
    <img src="images/varspace.gif" width="8">
    <b>Parameters:</b>
      <table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $directory
                   :
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 The name of the directory containing the extracted .xlsx parts.
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $includesheets
                   <font style="font-size: 10pt; font-family: Arial;"> 
                       (optional)</font>:
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 Set whether worksheets are returned with URIs.  The Default setting is true.
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><br>
    </td>
				</tr>
 
        

        

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" width="8">
            <font style="font-size: 10pt; font-family: Arial;"><b>Example:</b></font>
            <div style="margin-left: 0.5in; margin-right: 8px; font-size: 9pt; font-family: Courier;"> 
            <pre xml:space="preserve">xquery version "1.0-ml";		    
import module namespace excel= "http://marklogic.com/openxml/excel" 
       at "/MarkLogic/openxml/spreadsheet-ml-support.xqy";
	    
excel:directory-uris("/Default_xlsx_parts/")
=&gt;
/Default_xlsx_parts/[Content_Types].xml
/Default_xlsx_parts/_rels/.rels
/Default_xlsx_parts/customXml/_rels/item1.xml.rels
/Default_xlsx_parts/customXml/item1.xml
/Default_xlsx_parts/customXml/itemProps1.xml
/Default_xlsx_parts/docProps/app.xml
/Default_xlsx_parts/docProps/core.xml
/Default_xlsx_parts/xl/_rels/workbook.xml.rels
/Default_xlsx_parts/xl/sharedStrings.xml
/Default_xlsx_parts/xl/styles.xml
/Default_xlsx_parts/xl/theme/theme1.xml
/Default_xlsx_parts/xl/workbook.xml
/Default_xlsx_parts/xl/worksheets/sheet1.xml
/Default_xlsx_parts/xl/worksheets/sheet2.xml
/Default_xlsx_parts/xl/worksheets/sheet3.xml
   
  </pre>
  
            </div>
            </td>
				</tr>

        <tr class="mainbody">
				  <td></td>
				</tr>
        </tbody></table><table class="mainbody" width="100%" border="0" cellpadding="0" cellspacing="0">

        <tbody><tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12">
      <hr class="control-line" size="1"></td>
				</tr>

        <tr class="mainbody">
				  <td>

            <table>
            <tbody><tr>
					<td colspan="2" style="font-size: 12pt; font-family: Courier;">
                 <a id="excel:get-mimetype"></a><b><font color="#c00831">
                 excel:get-mimetype</font></b>(
                    </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      $uri as xs:string
                      </td>
				      </tr><tr>
					<td colspan="2" style="font-size: 11pt; font-family: Courier;">)&nbsp; as &nbsp;xs:string?</td>
				      </tr>
            </tbody></table>

          </td>
				</tr>

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12"></td>
				</tr>

        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
          <img src="images/varspace.gif" width="8">
          <b>Summary:</b>
          <div style="margin-left: 0.5in; margin-right: 8px; font-family: arial; font-size: 10pt;"> <br>
            This function returns the mimetype for the given URI. Wrapper for xdmp:uri-content-type().
          </div><br>
          </td>
				</tr>
        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
    <img src="images/varspace.gif" width="8">
    <b>Parameters:</b>
      <table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $uri
                   :
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 URI reference
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><br>
    </td>
				</tr>
 
        

        

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" width="8">
            <font style="font-size: 10pt; font-family: Arial;"><b>Example:</b></font>
            <div style="margin-left: 0.5in; margin-right: 8px; font-size: 9pt; font-family: Courier;"> 
            <pre xml:space="preserve">xquery version "1.0-ml";
import module namespace excel= "http://marklogic.com/openxml/excel" 
       at "/MarkLogic/openxml/spreadsheet-ml-support.xqy";

excel:get-mimetype("Default.xlsx")
=&gt; 
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

  </pre>
  
            </div>
            </td>
				</tr>

        <tr class="mainbody">
				  <td></td>
				</tr>
        </tbody></table><table class="mainbody" width="100%" border="0" cellpadding="0" cellspacing="0">

        <tbody><tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12">
      <hr class="control-line" size="1"></td>
				</tr>

        <tr class="mainbody">
				  <td>

            <table>
            <tbody><tr>
					<td colspan="2" style="font-size: 12pt; font-family: Courier;">
                 <a id="excel:gregorian-to-julian"></a><b><font color="#c00831">
                 excel:gregorian-to-julian</font></b>(
                    </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      $date as xs:date 
                      </td>
				      </tr><tr>
				      </tr><tr>
					<td colspan="2" style="font-size: 11pt; font-family: Courier;">)&nbsp; as &nbsp;xs:integer</td>
				      </tr>
            </tbody></table>

          </td>
				</tr>

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12"></td>
				</tr>

        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
          <img src="images/varspace.gif" width="8">
          <b>Summary:</b>
          <div style="margin-left: 0.5in; margin-right: 8px; font-family: arial; font-size: 10pt;"> <br>
            This function converts a gregorian date to an Excel julian day
          </div><br>
          </td>
				</tr>
        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
    <img src="images/varspace.gif" width="8">
    <b>Parameters:</b>
      <table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $date
                   :
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 The date.
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table>
         <br>
    </td>
				</tr>
 
        

        

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" width="8">
            <font style="font-size: 10pt; font-family: Arial;"><b>Example:</b></font>
            <div style="margin-left: 0.5in; margin-right: 8px; font-size: 9pt; font-family: Courier;"> 
            <pre xml:space="preserve">xquery version "1.0-ml";		    
import module namespace excel= "http://marklogic.com/openxml/excel" 
       at "/MarkLogic/openxml/spreadsheet-ml-support.xqy";
       
excel:gregorian-to-julian(xs:date("2009-04-06"))
=&gt;
39909
       
  </pre>
  
            </div>
            </td>
				</tr>

        <tr class="mainbody">
				  <td></td>
				</tr>
        </tbody></table><table class="mainbody" width="100%" border="0" cellpadding="0" cellspacing="0">

        <tbody><tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12">
      <hr class="control-line" size="1"></td>
				</tr>

        <tr class="mainbody">
				  <td>

            <table>
            <tbody><tr>
					<td colspan="2" style="font-size: 12pt; font-family: Courier;">
                 <a id="excel:julian-to-gregorian"></a><b><font color="#c00831">
                 excel:julian-to-gregorian</font></b>(
                    </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      $excel-julian-day as xs:integer
                      </td>
				      </tr><tr>
					<td colspan="2" style="font-size: 11pt; font-family: Courier;">)&nbsp; as &nbsp;xs:dateTime</td>
				      </tr>
            </tbody></table>

          </td>
				</tr>

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12"></td>
				</tr>

        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
          <img src="images/varspace.gif" width="8">
          <b>Summary:</b>
          <div style="margin-left: 0.5in; margin-right: 8px; font-family: arial; font-size: 10pt;"> <br>
            This function converts and Excel julian day number to a gregorian date.
          </div><br>
          </td>
				</tr>
        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
    <img src="images/varspace.gif" width="8">
    <b>Parameters:</b>
      <table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $excel-julian-day
                   :
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 The Excel julian day.
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><br>
    </td>
				</tr>
 
        

        

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" width="8">
            <font style="font-size: 10pt; font-family: Arial;"><b>Example:</b></font>
            <div style="margin-left: 0.5in; margin-right: 8px; font-size: 9pt; font-family: Courier;"> 
            <pre xml:space="preserve">xquery version "1.0-ml";
import module namespace excel= "http://marklogic.com/openxml/excel" 
       at "/MarkLogic/openxml/spreadsheet-ml-support.xqy";
       
excel:julian-to-gregorian(39909)
=&gt;
2009-04-06
       

  </pre>
  
            </div>
            </td>
				</tr>

        <tr class="mainbody">
				  <td></td>
				</tr>
        </tbody></table><table class="mainbody" width="100%" border="0" cellpadding="0" cellspacing="0">

        <tbody><tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12">
      <hr class="control-line" size="1"></td>
				</tr>

        <tr class="mainbody">
				  <td>

            <table>
            <tbody><tr>
					<td colspan="2" style="font-size: 12pt; font-family: Courier;">
                 <a id="excel:map-shared-strings"></a><b><font color="#c00831">
                 excel:map-shared-strings</font></b>(
                    </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      $sheet as element(ms:worksheet), 
                      </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      $shared-strings as element(ms:sst)
                      </td>
				      </tr><tr>
					<td colspan="2" style="font-size: 11pt; font-family: Courier;">)&nbsp; as &nbsp;element(ms:worksheet)</td>
				      </tr>
            </tbody></table>

          </td>
				</tr>

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12"></td>
				</tr>

        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
          <img src="images/varspace.gif" width="8">
          <b>Summary:</b>
          <div style="margin-left: 0.5in; margin-right: 8px; font-family: arial; font-size: 10pt;"> <br>
This function dereferences cell text values so the actual text value is stored within
the worksheet, instead of just a reference to the sharedStrings table. For string values in worksheet cells, <br/>Excel stores an index to the sharedStrings table (ms:sst element, sharedStrings.xml in the .xlsx package).  We dereference for search, and as people would like to get as much information <br/>in the actual worksheet as possible, instead of having to map disparate parts within a .xlsx package.  You can store this worksheet with the parts from the original .xlsx package, and still <br/>open succesfully in Excel if you were to zip the parts back up. On save, Excel will setup the references to sharedStrings again.</div><br>
          </td>
				</tr>
        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
    <img src="images/varspace.gif" width="8">
    <b>Parameters:</b>
      <table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $sheet
                   :
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 The worksheet with cells to be mapped to sharedStrings table.
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $shared-strings
                   :
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 The sharedStrings table.
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><br>
    </td>
				</tr>
 
        

        

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" width="8">
            <font style="font-size: 10pt; font-family: Arial;"><b>Example:</b></font>
            <div style="margin-left: 0.5in; margin-right: 8px; font-size: 9pt; font-family: Courier;"> 
            <pre xml:space="preserve">xquery version "1.0-ml";
import module namespace excel= "http://marklogic.com/openxml/excel" 
     at "/MarkLogic/openxml/spreadsheet-ml-support.xqy";
declare namespace ms = "http://schemas.openxmlformats.org/spreadsheetml/2006/main";
        
let $ss := fn:doc(excel:sharedstring-uri("/Default_xlsx_parts/"))/node()

let $ws:= (&lt;ms:worksheet&gt;
                &lt;ms:sheetData&gt;
                 &lt;ms:row&gt;
                   &lt;ms:c t="s"&gt;
                   &lt;ms:v&gt;1&lt;/ms:v&gt;
                 &lt;/ms:c&gt;
                &lt;/ms:row&gt;
               &lt;/ms:sheetData&gt;
           &lt;/ms:worksheet&gt;)

return excel:map-shared-strings($ws,$ss)
=&gt;
&lt;ms:worksheet xmlns:ms="http://schemas.openxmlformats.org/spreadsheetml/2006/main"&gt;
   &lt;ms:sheetData&gt;
      &lt;ms:row&gt;
	&lt;ms:c t="inlineStr"&gt;
	   &lt;ms:is&gt;&lt;ms:t&gt;TEST&lt;/ms:t&gt;&lt;/ms:is&gt;
	&lt;/ms:c&gt;
      &lt;/ms:row&gt;
   &lt;/ms:sheetData&gt;
&lt;/ms:worksheet&gt;

    
  </pre>
  
            </div>
            </td>
				</tr>

        <tr class="mainbody">
				  <td></td>
				</tr>
        </tbody></table><table class="mainbody" width="100%" border="0" cellpadding="0" cellspacing="0">

        <tbody><tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12">
      <hr class="control-line" size="1"></td>
				</tr>

        <tr class="mainbody">
				  <td>

            <table>
            <tbody><tr>
					<td colspan="2" style="font-size: 12pt; font-family: Courier;">
                   <a id="excel:package-rels"></a><b><font color="#c00831">
                   excel:package-rels</font></b>(&nbsp;) as&nbsp;element(pr:Relationships)
                    </td>
				      </tr>
            </tbody></table>

          </td>
				</tr>

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12"></td>
				</tr>

        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
          <img src="images/varspace.gif" width="8">
          <b>Summary:</b>
          <div style="margin-left: 0.5in; margin-right: 8px; font-family: arial; font-size: 10pt;"> <br>
            This function creates a package relationships element for the .xlsx package (_rels/.rels)
          </div><br>
          </td>
				</tr>
        
 
        

        

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" width="8">
            <font style="font-size: 10pt; font-family: Arial;"><b>Example:</b></font>
            <div style="margin-left: 0.5in; margin-right: 8px; font-size: 9pt; font-family: Courier;"> 
            <pre xml:space="preserve">		    
xquery version "1.0-ml";
import module namespace excel= "http://marklogic.com/openxml/excel" 
       at "/MarkLogic/openxml/spreadsheet-ml-support.xqy";

excel:package-rels()
       =&gt;
&lt;Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"&gt;
   &lt;Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/&gt;
&lt;/Relationships&gt;
       
  </pre>
  
            </div>
            </td>
				</tr>

        <tr class="mainbody">
				  <td></td>
				</tr>
        </tbody></table><table class="mainbody" width="100%" border="0" cellpadding="0" cellspacing="0">

        <tbody><tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12">
      <hr class="control-line" size="1"></td>
				</tr>

        <tr class="mainbody">
				  <td>

            <table>
            <tbody><tr>
					<td colspan="2" style="font-size: 12pt; font-family: Courier;">
                 <a id="excel:r1c1-to-a1"></a><b><font color="#c00831">
                 excel:r1c1-to-a1</font></b>(
                    </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      $row-index as xs:integer, 
                      </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      $col-index as xs:integer
                      </td>
				      </tr><tr>
					<td colspan="2" style="font-size: 11pt; font-family: Courier;">)&nbsp; as &nbsp;xs:string</td>
				      </tr>
            </tbody></table>

          </td>
				</tr>

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12"></td>
				</tr>

        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
          <img src="images/varspace.gif" width="8">
          <b>Summary:</b>
          <div style="margin-left: 0.5in; margin-right: 8px; font-family: arial; font-size: 10pt;"> <br>
This function converts the row and column numbers from R1C1 notation (row/column notation) to A1
notation. <br/>Excel's limits for rows is 1048756, and for columns is 16384.
This function returns A1 notation for any cell in that range from A1 to
WID1048576. </div><br>
          </td>
				</tr>
        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
    <img src="images/varspace.gif" width="8">
    <b>Parameters:</b>
      <table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $row-index
                   :
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 the row index
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $col-index
                   :
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 the column index
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><br>
    </td>
				</tr>
 
        

        

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" width="8">
            <font style="font-size: 10pt; font-family: Arial;"><b>Example:</b></font>
            <div style="margin-left: 0.5in; margin-right: 8px; font-size: 9pt; font-family: Courier;"> 
            <pre xml:space="preserve">xquery version "1.0-ml";
import module namespace excel= "http://marklogic.com/openxml/excel" 
       at "/MarkLogic/openxml/spreadsheet-ml-support.xqy";

excel:r1c1-to-a1(1,2378)
=&gt;
CJL1 
 </pre>
  
            </div>
            </td>
				</tr>

        <tr class="mainbody">
				  <td></td>
				</tr>
        </tbody></table><table class="mainbody" width="100%" border="0" cellpadding="0" cellspacing="0">

        <tbody><tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12">
      <hr class="control-line" size="1"></td>
				</tr>

        <tr class="mainbody">
				  <td>

            <table>
            <tbody><tr>
					<td colspan="2" style="font-size: 12pt; font-family: Courier;">
                 <a id="excel:row"></a><b><font color="#c00831">
                 excel:row</font></b>(
                    </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      $cells as element(ms:c)+
                      </td>
				      </tr><tr>
					<td colspan="2" style="font-size: 11pt; font-family: Courier;">)&nbsp; as &nbsp;element(ms:row)</td>
				      </tr>
            </tbody></table>

          </td>
				</tr>

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12"></td>
				</tr>

        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
          <img src="images/varspace.gif" width="8">
          <b>Summary:</b>
          <div style="margin-left: 0.5in; margin-right: 8px; font-family: arial; font-size: 10pt;"> <br>
            This function creates a worksheet row.
          </div><br>
          </td>
				</tr>
        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
    <img src="images/varspace.gif" width="8">
    <b>Parameters:</b>
      <table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $cells
                   :
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
The cells to be populated within the row. It is assumed that all cells
have an A1 reference and that they are in the same row. The row number<br/>is determined by the row number identified by the cell. </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><br>
    </td>
				</tr>
 
        

        

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" width="8">
            <font style="font-size: 10pt; font-family: Arial;"><b>Example:</b></font>
            <div style="margin-left: 0.5in; margin-right: 8px; font-size: 9pt; font-family: Courier;"> 
            <pre xml:space="preserve">xquery version "1.0-ml";
import module namespace excel= "http://marklogic.com/openxml/excel" 
at "/MarkLogic/openxml/spreadsheet-ml-support.xqy";


let $cell1 := excel:cell("A3",32999,(),0)
let $cell2 := excel:cell("B3",123)
let $cell3 := excel:cell("C3","Foo")
return excel:row(($cell1,$cell2,$cell3))
=&gt;
&lt;ms:row r="3" xmlns:ms="http://schemas.openxmlformats.org/spreadsheetml/2006/main"&gt;
   &lt;ms:c r="A3" s="0"&gt;&lt;ms:v&gt;32999&lt;/ms:v&gt;&lt;/ms:c&gt;
   &lt;ms:c r="B3"&gt;&lt;ms:v&gt;123&lt;/ms:v&gt;&lt;/ms:c&gt;
   &lt;ms:c r="C3" t="inlineStr"&gt;&lt;ms:is&gt;&lt;ms:t&gt;Foo&lt;/ms:t&gt;&lt;/ms:is&gt;&lt;/ms:c&gt;
&lt;/ms:row&gt;


</pre>
  
            </div>
            </td>
				</tr>

        <tr class="mainbody">
				  <td></td>
				</tr>
        </tbody></table><table class="mainbody" width="100%" border="0" cellpadding="0" cellspacing="0">

        <tbody><tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12">
      <hr class="control-line" size="1"></td>
				</tr>

        <tr class="mainbody">
				  <td>

            <table>
            <tbody><tr>
					<td colspan="2" style="font-size: 12pt; font-family: Courier;">
                 <a id="excel:set-cells"></a><b><font color="#c00831">
                 excel:set-cells</font></b>(
                    </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      $worksheet as element(ms:worksheet), 
                      </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      $cells as element(ms:c)*
                      </td>
				      </tr><tr>
					<td colspan="2" style="font-size: 11pt; font-family: Courier;">)&nbsp; as &nbsp;element(ms:worksheet)</td>
				      </tr>
            </tbody></table>

          </td>
				</tr>

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12"></td>
				</tr>

        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
          <img src="images/varspace.gif" width="8">
          <b>Summary:</b>
          <div style="margin-left: 0.5in; margin-right: 8px; font-family: arial; font-size: 10pt;"> <br>
This function sets the cells within the provided worksheet. If the cell
exists in the worksheet, it will be replaced. If the cell doesn't
exist, it will be set <br/>in the proper order within the proper row. If the
row doesn't exist, the row will be created and populated with the cell.
</div><br>
          </td>
				</tr>
        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
    <img src="images/varspace.gif" width="8">
    <b>Parameters:</b>
      <table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $worksheet
                   :
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 The worksheet where to set the cells.
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $cells
                   :
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 The cells to be set within $worksheet.
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><br>
    </td>
				</tr>
 
        

        

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" width="8">
            <font style="font-size: 10pt; font-family: Arial;"><b>Example:</b></font>
            <div style="margin-left: 0.5in; margin-right: 8px; font-size: 9pt; font-family: Courier;"> 
            <pre xml:space="preserve">xquery version "1.0-ml";
import module namespace excel= "http://marklogic.com/openxml/excel" 
       at "/MarkLogic/openxml/spreadsheet-ml-support.xqy";
       
declare namespace ms="http://schemas.openxmlformats.org/spreadsheetml/2006/main";

let $cell1 := excel:cell("A1","foo")
let $cell2 := excel:cell("B3",123)
let $cell3 := excel:cell("A5",456)

let $worksheet :=
&lt;ms:worksheet&gt;	
   &lt;ms:sheetData&gt;
      &lt;ms:row r="1"&gt;
         &lt;ms:c r="A1"&gt;&lt;ms:v&gt;1&lt;/ms:v&gt;&lt;/ms:c&gt;
      &lt;/ms:row&gt;
      &lt;ms:row r="5"&gt;
         &lt;ms:c r="C5"&gt;&lt;ms:v&gt;1&lt;/ms:v&gt;&lt;/ms:c&gt;
      &lt;/ms:row&gt;
   &lt;/ms:sheetData&gt;
&lt;/ms:worksheet&gt;
return excel:set-cells($worksheet, ($cell1,$cell2,$cell3))
=&gt;
&lt;ms:worksheet xmlns:ms="http://schemas.openxmlformats.org/spreadsheetml/2006/main"&gt;
   &lt;ms:sheetData&gt;
      &lt;ms:row r="1"&gt;
         &lt;ms:c r="A1" t="inlineStr"&gt;&lt;ms:is&gt;&lt;ms:t&gt;foo&lt;/ms:t&gt;&lt;/ms:is&gt;&lt;/ms:c&gt;
      &lt;/ms:row&gt;
      &lt;ms:row r="3"&gt;
	 &lt;ms:c r="B3"&gt;&lt;ms:v&gt;123&lt;/ms:v&gt;&lt;/ms:c&gt;
      &lt;/ms:row&gt;
      &lt;ms:row r="5"&gt;
	 &lt;ms:c r="A5"&gt;&lt;ms:v&gt;456&lt;/ms:v&gt;&lt;/ms:c&gt;
	 &lt;ms:c r="C5"&gt;&lt;ms:v&gt;1&lt;/ms:v&gt;&lt;/ms:c&gt;
      &lt;/ms:row&gt;
   &lt;/ms:sheetData&gt;
&lt;/ms:worksheet&gt;

       
  </pre>
  
            </div>
            </td>
				</tr><tr class="mainbody">
				  <td><img src="images/varspace.gif" width="8">
            <font style="font-size: 10pt; font-family: Arial;"><b>Example:</b></font>
            <div style="margin-left: 0.5in; margin-right: 8px; font-size: 9pt; font-family: Courier;"> 
            <pre xml:space="preserve">xquery version "1.0-ml";
import module namespace excel= "http://marklogic.com/openxml/excel" 
at "/MarkLogic/openxml/spreadsheet-ml-support.xqy";

declare namespace ms="http://schemas.openxmlformats.org/spreadsheetml/2006/main";

let $cel1 := excel:cell("G23","bar")
let $worksheet :=
&lt;ms:worksheet&gt;	
   &lt;ms:sheetData&gt;
   &lt;/ms:sheetData&gt;
&lt;/ms:worksheet&gt;
return excel:set-cells($worksheet, ($cel1))
=&gt;
&lt;ms:worksheet xmlns:ms="http://schemas.openxmlformats.org/spreadsheetml/2006/main"&gt;
   &lt;ms:sheetData&gt;
      &lt;ms:row r="23"&gt;
         &lt;ms:c r="G23" t="inlineStr"&gt;&lt;ms:is&gt;&lt;ms:t&gt;bar&lt;/ms:t&gt;&lt;/ms:is&gt;&lt;/ms:c&gt;
      &lt;/ms:row&gt;
   &lt;/ms:sheetData&gt;
&lt;/ms:worksheet&gt;
       
  </pre>
  
            </div>
            </td>
				</tr>

        <tr class="mainbody">
				  <td></td>
				</tr>
        </tbody></table><table class="mainbody" width="100%" border="0" cellpadding="0" cellspacing="0">

        <tbody><tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12">
      <hr class="control-line" size="1"></td>
				</tr>

        <tr class="mainbody">
				  <td>

            <table>
            <tbody><tr>
					<td colspan="2" style="font-size: 12pt; font-family: Courier;">
                 <a id="excel:sharedstring-uri"></a><b><font color="#c00831">
                 excel:sharedstring-uri</font></b>(
                    </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      $directory as xs:string
                      </td>
				      </tr><tr>
					<td colspan="2" style="font-size: 11pt; font-family: Courier;">)&nbsp; as &nbsp;xs:string*</td>
				      </tr>
            </tbody></table>

          </td>
				</tr>

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12"></td>
				</tr>

        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
          <img src="images/varspace.gif" width="8">
          <b>Summary:</b>
          <div style="margin-left: 0.5in; margin-right: 8px; font-family: arial; font-size: 10pt;"> <br>
            This function returns the URI for the sharedString table, extracted from .xlsx using Open XML Extract pipeline.
          </div><br>
          </td>
				</tr>
        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
    <img src="images/varspace.gif" width="8">
    <b>Parameters:</b>
      <table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $directory
                   :
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 The name of the directory containing the extracted .xlsx parts.
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><br>
    </td>
				</tr>
 
        

        

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" width="8">
            <font style="font-size: 10pt; font-family: Arial;"><b>Example:</b></font>
            <div style="margin-left: 0.5in; margin-right: 8px; font-size: 9pt; font-family: Courier;"> 
            <pre xml:space="preserve">xquery version "1.0-ml"; 
import module namespace excel= "http://marklogic.com/openxml/excel" 
at "/MarkLogic/openxml/spreadsheet-ml-support.xqy";

excel:sharedstring-uri("/Default_xlsx_parts/")
=&gt;
/Default_xlsx_parts/xl/sharedStrings.xml
       
       
  </pre>
  
            </div>
            </td>
				</tr>

        <tr class="mainbody">
				  <td></td>
				</tr>
        </tbody></table><table class="mainbody" width="100%" border="0" cellpadding="0" cellspacing="0">

        <tbody><tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12">
      <hr class="control-line" size="1"></td>
				</tr>

        <tr class="mainbody">
				  <td>

            <table>
            <tbody><tr>
					<td colspan="2" style="font-size: 12pt; font-family: Courier;">
                 <a id="excel:sheet-uris"></a><b><font color="#c00831">
                 excel:sheet-uris</font></b>(
                    </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      $directory as xs:string
                      </td>
				      </tr><tr>
					<td colspan="2" style="font-size: 11pt; font-family: Courier;">)&nbsp; as &nbsp;xs:string*</td>
				      </tr>
            </tbody></table>

          </td>
				</tr>

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12"></td>
				</tr>

        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
          <img src="images/varspace.gif" width="8">
          <b>Summary:</b>
          <div style="margin-left: 0.5in; margin-right: 8px; font-family: arial; font-size: 10pt;"> <br>
This function returns only the worksheet URIs for files extracted from
.xlsx package using Open XML Extract pipeline. </div><br>
          </td>
				</tr>
        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
    <img src="images/varspace.gif" width="8">
    <b>Parameters:</b>
      <table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $directory
                   :
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 The name of the directory containing the extracted .xlsx parts.
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><br>
    </td>
				</tr>
 
        

        

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" width="8">
            <font style="font-size: 10pt; font-family: Arial;"><b>Example:</b></font>
            <div style="margin-left: 0.5in; margin-right: 8px; font-size: 9pt; font-family: Courier;"> 
            <pre xml:space="preserve">xquery version "1.0-ml";
import module namespace excel= "http://marklogic.com/openxml/excel" 
       at "/MarkLogic/openxml/spreadsheet-ml-support.xqy";
	    
excel:sheet-uris("/Default_xlsx_parts/")
=&gt;
/Default_xlsx_parts/xl/worksheets/sheet1.xml
/Default_xlsx_parts/xl/worksheets/sheet2.xml
/Default_xlsx_parts/xl/worksheets/sheet3.xml

  </pre>
  
            </div>
            </td>
				</tr>

        <tr class="mainbody">
				  <td></td>
				</tr>
        </tbody></table><table class="mainbody" width="100%" border="0" cellpadding="0" cellspacing="0">

        <tbody><tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12">
      <hr class="control-line" size="1"></td>
				</tr>

        <tr class="mainbody">
				  <td>

            <table>
            <tbody><tr>
					<td colspan="2" style="font-size: 12pt; font-family: Courier;">
                 <a id="excel:table"></a><b><font color="#c00831">
                 excel:table</font></b>(
                    </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      $table-number as xs:integer, 
                      </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      $tablerange as xs:string, 
                      </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      $column-names as xs:string+, 
                      </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      [$auto-filter as xs:boolean], 
                      </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      [$style as xs:boolean]
                      </td>
				      </tr><tr>
					<td colspan="2" style="font-size: 11pt; font-family: Courier;">)&nbsp; as &nbsp;element(ms:table)</td>
				      </tr>
            </tbody></table>

          </td>
				</tr>

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12"></td>
				</tr>

        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
          <img src="images/varspace.gif" width="8">
          <b>Summary:</b>
          <div style="margin-left: 0.5in; margin-right: 8px; font-family: arial; font-size: 10pt;"> <br>
	    This function creates a table element for a .xlsx package (xl/tables/table#.xml). Tables in SpreadsheetML, manifest themselves as Named Ranges in an Excel worksheet.  <br/>With these tables you can apply auto-formatting for columns, as well as styling.
          </div><br>
          </td>
				</tr>
        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
    <img src="images/varspace.gif" width="8">
    <b>Parameters:</b>
      <table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $table-number
                   :
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 The number of the table.
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $tablerange
                   :
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 The ranger of the table in Excel notation A1-colon notation. ("A1:C3")
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $column-names
                   :
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 The names of the columns.  These are the values from the first row in the cells found in $tablerange.
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $auto-filter
                   <font style="font-size: 10pt; font-family: Arial;"> 
                       (optional)</font>:
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 If true, columns will have autofilter enabled.  Default true.
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $style
                   <font style="font-size: 10pt; font-family: Arial;"> 
                       (optional)</font>:
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 If true, simple style of TableStyleMedium10 is applied to table. Default none.
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><br>
    </td>
				</tr>
 
        

        

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" width="8">
            <font style="font-size: 10pt; font-family: Arial;"><b>Example:</b></font>
            <div style="margin-left: 0.5in; margin-right: 8px; font-size: 9pt; font-family: Courier;"> 
            <pre xml:space="preserve">xquery version "1.0-ml";
import module namespace excel= "http://marklogic.com/openxml/excel" 
       at "/MarkLogic/openxml/spreadsheet-ml-support.xqy";
       
excel:table(1,"A1:C3",("Heading1","Heading2","Heading3"))
=&gt;
&lt;table id="1" name="Table1" displayName="Table1" ref="A1:C3" totalsRowShown="0" xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"&gt;
   &lt;autoFilter ref="A1:C3"/&gt;
   &lt;tableColumns count="3"&gt;
      &lt;tableColumn id="1" name="Heading1"/&gt;
      &lt;tableColumn id="2" name="Heading2"/&gt;
      &lt;tableColumn id="3" name="Heading3"/&gt;
   &lt;/tableColumns&gt;
&lt;/table&gt;

  </pre>
  
            </div>
            </td>
				</tr><tr class="mainbody">
				  <td><img src="images/varspace.gif" width="8">
            <font style="font-size: 10pt; font-family: Arial;"><b>Example:</b></font>
            <div style="margin-left: 0.5in; margin-right: 8px; font-size: 9pt; font-family: Courier;"> 
            <pre xml:space="preserve">xquery version "1.0-ml";
import module namespace excel= "http://marklogic.com/openxml/excel" 
       at "/MarkLogic/openxml/spreadsheet-ml-support.xqy";
       
excel:table(1,"A1:C3",("Heading1","Heading2","Heading3"),xs:boolean("false"),xs:boolean("true"))
=&gt;
&lt;table id="1" name="Table1" displayName="Table1" ref="A1:C3" totalsRowShown="0" xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"&gt;
   &lt;tableColumns count="3"&gt;
       &lt;tableColumn id="1" name="Heading1"/&gt;
       &lt;tableColumn id="2" name="Heading2"/&gt;
       &lt;tableColumn id="3" name="Heading3"/&gt;&lt;/tableColumns&gt;
   &lt;tableStyleInfo name="TableStyleMedium10" showFirstColumn="0" showLastColumn="0" showRowStripes="1" showColumnStripes="0"/&gt;
&lt;/table&gt;
       
       
  </pre>
  
            </div>
            </td>
				</tr>

        <tr class="mainbody">
				  <td></td>
				</tr>
        </tbody></table><table class="mainbody" width="100%" border="0" cellpadding="0" cellspacing="0">

        <tbody><tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12">
      <hr class="control-line" size="1"></td>
				</tr>

        <tr class="mainbody">
				  <td>

            <table>
            <tbody><tr>
					<td colspan="2" style="font-size: 12pt; font-family: Courier;">
                 <a id="excel:workbook"></a><b><font color="#c00831">
                 excel:workbook</font></b>(
                    </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      $worksheet-count as xs:integer
                      </td>
				      </tr><tr>
					<td colspan="2" style="font-size: 11pt; font-family: Courier;">)&nbsp; as &nbsp;element(ms:workbook)</td>
				      </tr>
            </tbody></table>

          </td>
				</tr>

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12"></td>
				</tr>

        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
          <img src="images/varspace.gif" width="8">
          <b>Summary:</b>
          <div style="margin-left: 0.5in; margin-right: 8px; font-family: arial; font-size: 10pt;"> <br>
            This function creates a workbook element for the .xlsx package (xl/workbook.xml) 
          </div><br>
          </td>
				</tr>
        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
    <img src="images/varspace.gif" width="8">
    <b>Parameters:</b>
      <table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $worksheet-count
                   :
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 The number of worksheets in the workbook.
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><br>
    </td>
				</tr>
 
        

        

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" width="8">
            <font style="font-size: 10pt; font-family: Arial;"><b>Example:</b></font>
            <div style="margin-left: 0.5in; margin-right: 8px; font-size: 9pt; font-family: Courier;"> 
            <pre xml:space="preserve">		    
xquery version "1.0-ml";
import module namespace excel= "http://marklogic.com/openxml/excel" 
at "/MarkLogic/openxml/spreadsheet-ml-support.xqy";

excel:workbook(3)
=&gt;
&lt;workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"&gt;
   &lt;sheets&gt;
      &lt;sheet name="Sheet1" sheetId="1" r:id="rId1"/&gt;
      &lt;sheet name="Sheet2" sheetId="2" r:id="rId2"/&gt;
      &lt;sheet name="Sheet3" sheetId="3" r:id="rId3"/&gt;
   &lt;/sheets&gt;
&lt;/workbook&gt;
       
       
  </pre>
  
            </div>
            </td>
				</tr>

        <tr class="mainbody">
				  <td></td>
				</tr>
        </tbody></table><table class="mainbody" width="100%" border="0" cellpadding="0" cellspacing="0">

        <tbody><tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12">
      <hr class="control-line" size="1"></td>
				</tr>

        <tr class="mainbody">
				  <td>

            <table>
            <tbody><tr>
					<td colspan="2" style="font-size: 12pt; font-family: Courier;">
                 <a id="excel:workbook-rels"></a><b><font color="#c00831">
                 excel:workbook-rels</font></b>(
                    </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      $worksheet-count as xs:integer
                      </td>
				      </tr><tr>
					<td colspan="2" style="font-size: 11pt; font-family: Courier;">)&nbsp; as &nbsp;element(pr:Relationships)</td>
				      </tr>
            </tbody></table>

          </td>
				</tr>

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12"></td>
				</tr>

        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
          <img src="images/varspace.gif" width="8">
          <b>Summary:</b>
          <div style="margin-left: 0.5in; margin-right: 8px; font-family: arial; font-size: 10pt;"> <br>
            This function creates a workbook relationships element for the .xlsx package (xl/_rels/workbook.xml.rels)
          </div><br>
          </td>
				</tr>
        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
    <img src="images/varspace.gif" width="8">
    <b>Parameters:</b>
      <table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $worksheet-count
                   :
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 The number of worksheets in the workbook.
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><br>
    </td>
				</tr>
 
        

        

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" width="8">
            <font style="font-size: 10pt; font-family: Arial;"><b>Example:</b></font>
            <div style="margin-left: 0.5in; margin-right: 8px; font-size: 9pt; font-family: Courier;"> 
            <pre xml:space="preserve">		    
xquery version "1.0-ml";
import module namespace excel= "http://marklogic.com/openxml/excel" 
       at "/MarkLogic/openxml/spreadsheet-ml-support.xqy";
       
excel:workbook-rels(3) 
=&gt;
&lt;Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"&gt;
   &lt;Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet1.xml"/&gt;
   &lt;Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet2.xml"/&gt;
   &lt;Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet3.xml"/&gt;
&lt;/Relationships&gt;
      
  </pre>
  
            </div>
            </td>
				</tr>

        <tr class="mainbody">
				  <td></td>
				</tr>
        </tbody></table><table class="mainbody" width="100%" border="0" cellpadding="0" cellspacing="0">

        <tbody><tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12">
      <hr class="control-line" size="1"></td>
				</tr>

        <tr class="mainbody">
				  <td>

            <table>
            <tbody><tr>
					<td colspan="2" style="font-size: 12pt; font-family: Courier;">
                 <a id="excel:workbook-sheet-names"></a><b><font color="#c00831">
                 excel:workbook-sheet-names</font></b>(
                    </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      $workbook as element(ms:workbook)
                      </td>
				      </tr><tr>
					<td colspan="2" style="font-size: 11pt; font-family: Courier;">)&nbsp; as &nbsp;xs:string*</td>
				      </tr>
            </tbody></table>

          </td>
				</tr>

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12"></td>
				</tr>

        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
          <img src="images/varspace.gif" width="8">
          <b>Summary:</b>
          <div style="margin-left: 0.5in; margin-right: 8px; font-family: arial; font-size: 10pt;"> <br>
            This function returns the iworksheet names for the workbook.
          </div><br>
          </td>
				</tr>
        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
    <img src="images/varspace.gif" width="8">
    <b>Parameters:</b>
      <table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $workbook
                   :
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 The workbook.
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><br>
    </td>
				</tr>
 
        

        

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" width="8">
            <font style="font-size: 10pt; font-family: Arial;"><b>Example:</b></font>
            <div style="margin-left: 0.5in; margin-right: 8px; font-size: 9pt; font-family: Courier;"> 
            <pre xml:space="preserve">xquery version "1.0-ml";
import module namespace excel= "http://marklogic.com/openxml/excel" 
       at "/MarkLogic/openxml/spreadsheet-ml-support.xqy";

let $workbook := fn:doc("/Default_xlsx_parts/xl/workbook.xml")/node()
return
  excel:workbook-sheet-names($workbook)
=&gt;
Sheet1
Sheet2
Sheet3


		  
  </pre>
  
            </div>
            </td>
				</tr>

        <tr class="mainbody">
				  <td></td>
				</tr>
        </tbody></table><table class="mainbody" width="100%" border="0" cellpadding="0" cellspacing="0">

        <tbody><tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12">
      <hr class="control-line" size="1"></td>
				</tr>

        <tr class="mainbody">
				  <td>

            <table>
            <tbody><tr>
					<td colspan="2" style="font-size: 12pt; font-family: Courier;">
                 <a id="excel:worksheet"></a><b><font color="#c00831">
                 excel:worksheet</font></b>(
                    </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      $rows as element(ms:row)*, 
                      </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      [$colwidths as element(ms:cols)?], 
                      </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      [$tbl-count as xs:integer]
                      </td>
				      </tr><tr>
					<td colspan="2" style="font-size: 11pt; font-family: Courier;">)&nbsp; as &nbsp;element(ms:worksheet)</td>
				      </tr>
            </tbody></table>

          </td>
				</tr>

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12"></td>
				</tr>

        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
          <img src="images/varspace.gif" width="8">
          <b>Summary:</b>
          <div style="margin-left: 0.5in; margin-right: 8px; font-family: arial; font-size: 10pt;"> <br>
            This function creates a worksheet for the .xlsx package (xl/worksheets/sheet#.xml)
          </div><br>
          </td>
				</tr>
        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
    <img src="images/varspace.gif" width="8">
    <b>Parameters:</b>
      <table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $rows
                   :
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 The rows for the worksheet.
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $colwidths
                   <font style="font-size: 10pt; font-family: Arial;"> 
                       (optional)</font>:
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 The custom column widths for the worksheet.
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $tbl-count
                   <font style="font-size: 10pt; font-family: Arial;"> 
                       (optional)</font>:
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 The number of tables associated with the worksheet.
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><br>
    </td>
				</tr>
 
        

        

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" width="8">
            <font style="font-size: 10pt; font-family: Arial;"><b>Example:</b></font>
            <div style="margin-left: 0.5in; margin-right: 8px; font-size: 9pt; font-family: Courier;"> 
            <pre xml:space="preserve">xquery version "1.0-ml";
import module namespace excel= "http://marklogic.com/openxml/excel" 
       at "/MarkLogic/openxml/spreadsheet-ml-support.xqy";
       
let $cells := ((excel:cell("A1",1), 
                excel:cell("B1",2), 
                excel:cell("C1",3)))
let $row := excel:row($cells)
return excel:worksheet($row)
=&gt;
&lt;worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"&gt;
   &lt;sheetData&gt;
      &lt;row r="1" xmlns:ms="http://schemas.openxmlformats.org/spreadsheetml/2006/main"&gt;
         &lt;c r="A1"&gt;&lt;v&gt;1&lt;/v&gt;&lt;/c&gt;
         &lt;c r="B1"&gt;&lt;v&gt;2&lt;/v&gt;&lt;/c&gt;
         &lt;c r="C1"&gt;&lt;v&gt;3&lt;/v&gt;&lt;/c&gt;
      &lt;/row&gt;
   &lt;/sheetData&gt;
&lt;/worksheet&gt; 
  </pre>
  
            </div>
            </td>
				</tr><tr class="mainbody">
				  <td><img src="images/varspace.gif" width="8">
            <font style="font-size: 10pt; font-family: Arial;"><b>Example:</b></font>
            <div style="margin-left: 0.5in; margin-right: 8px; font-size: 9pt; font-family: Courier;"> 
            <pre xml:space="preserve">xquery version "1.0-ml";
import module namespace excel= "http://marklogic.com/openxml/excel" 
       at "/MarkLogic/openxml/spreadsheet-ml-support.xqy";
       
let $cells := ((excel:cell("A1",1), 
                excel:cell("B1",2), 
                excel:cell("C1",3)))
let $row := excel:row($cells)
let $colwidths := excel:column-width((25,25,25))
return excel:worksheet($row,$colwidths)
=&gt;
&lt;worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"&gt;
   &lt;sheetData&gt;
      &lt;cols&gt;
         &lt;col min="1" max="1" width="25" customWidth="1"/&gt;
         &lt;col min="2" max="2" width="25" customWidth="1"/&gt;
         &lt;col min="3" max="3" width="25" customWidth="1"/&gt;
      &lt;/cols&gt;		
      &lt;row r="1" xmlns:ms="http://schemas.openxmlformats.org/spreadsheetml/2006/main"&gt;
         &lt;c r="A1"&gt;&lt;v&gt;1&lt;/v&gt;&lt;/c&gt;
         &lt;c r="B1"&gt;&lt;v&gt;2&lt;/v&gt;&lt;/c&gt;
         &lt;c r="C1"&gt;&lt;v&gt;3&lt;/v&gt;&lt;/c&gt;
      &lt;/row&gt;
   &lt;/sheetData&gt;
&lt;/worksheet&gt;
       

  </pre>
  
            </div>
            </td>
				</tr><tr class="mainbody">
				  <td><img src="images/varspace.gif" width="8">
            <font style="font-size: 10pt; font-family: Arial;"><b>Example:</b></font>
            <div style="margin-left: 0.5in; margin-right: 8px; font-size: 9pt; font-family: Courier;"> 
            <pre xml:space="preserve">xquery version "1.0-ml";
import module namespace excel= "http://marklogic.com/openxml/excel" 
       at "/MarkLogic/openxml/spreadsheet-ml-support.xqy";
       
let $cells := ((excel:cell("A1",1), 
                excel:cell("B1",2), 
                excel:cell("C1",3)))
let $row := excel:row($cells)
let $colwidths := excel:column-width((25,25,25))
return excel:worksheet($row,$colwidths,2)
=&gt;
&lt;worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"&gt;
   &lt;cols&gt;
      &lt;col min="1" max="1" width="25" customWidth="1"/&gt;
      &lt;col min="2" max="2" width="25" customWidth="1"/&gt;
      &lt;col min="3" max="3" width="25" customWidth="1"/&gt;
   &lt;/cols&gt;	
   &lt;sheetData&gt;
      &lt;row r="1" xmlns:ms="http://schemas.openxmlformats.org/spreadsheetml/2006/main"&gt;
         &lt;c r="A1"&gt;&lt;v&gt;1&lt;/v&gt;&lt;/c&gt;
         &lt;c r="B1"&gt;&lt;v&gt;2&lt;/v&gt;&lt;/c&gt;
         &lt;c r="C1"&gt;&lt;v&gt;3&lt;/v&gt;&lt;/c&gt;
      &lt;/row&gt;
   &lt;/sheetData&gt;
   &lt;tableParts count="2"&gt;
      &lt;tablePart r:id="rId1"/&gt;
      &lt;tablePart r:id="rId2"/&gt;
   &lt;/tableParts&gt;
&lt;/worksheet&gt;
       

  </pre>
  
            </div>
            </td>
				</tr>

        <tr class="mainbody">
				  <td></td>
				</tr>
        </tbody></table><table class="mainbody" width="100%" border="0" cellpadding="0" cellspacing="0">

        <tbody><tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12">
      <hr class="control-line" size="1"></td>
				</tr>

        <tr class="mainbody">
				  <td>

            <table>
            <tbody><tr>
					<td colspan="2" style="font-size: 12pt; font-family: Courier;">
                 <a id="excel:worksheet-rels"></a><b><font color="#c00831">
                 excel:worksheet-rels</font></b>(
                    </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      $start-ind as xs:integer, 
                      </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      $tbl-count as xs:integer
                      </td>
				      </tr><tr>
					<td colspan="2" style="font-size: 11pt; font-family: Courier;">)&nbsp; as &nbsp;element(pr:Relationships)</td>
				      </tr>
            </tbody></table>

          </td>
				</tr>

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12"></td>
				</tr>

        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
          <img src="images/varspace.gif" width="8">
          <b>Summary:</b>
          <div style="margin-left: 0.5in; margin-right: 8px; font-family: arial; font-size: 10pt;"> <br>
            This function createts a worksheet relationships element for a .xlsx package (xl/worksheets/_rels/sheet#.xml.rels)
          </div><br>
          </td>
				</tr>
        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
    <img src="images/varspace.gif" width="8">
    <b>Parameters:</b>
      <table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $start-ind
                   :
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 The starting index for tables relating to the worksheet.
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $tbl-count
                   :
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 The number of tables relating to the worksheet.
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><br>
    </td>
				</tr>
 
        

        

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" width="8">
            <font style="font-size: 10pt; font-family: Arial;"><b>Example:</b></font>
            <div style="margin-left: 0.5in; margin-right: 8px; font-size: 9pt; font-family: Courier;"> 
            <pre xml:space="preserve">xquery version "1.0-ml";
import module namespace excel= "http://marklogic.com/openxml/excel" 
       at "/MarkLogic/openxml/spreadsheet-ml-support.xqy";
       
excel:worksheet-rels(2,2)
       =&gt;
&lt;Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"&gt;
   &lt;Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/table" Target="../tables/table2.xml"/&gt;
   &lt;Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/table" Target="../tables/table3.xml"/&gt;
&lt;/Relationships&gt;
       
       
  </pre>
  
            </div>
            </td>
				</tr>

        <tr class="mainbody">
				  <td></td>
				</tr>
        </tbody></table><table class="mainbody" width="100%" border="0" cellpadding="0" cellspacing="0">

        <tbody><tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12">
      <hr class="control-line" size="1"></td>
				</tr>

        <tr class="mainbody">
				  <td>

            <table>
            <tbody><tr>
					<td colspan="2" style="font-size: 12pt; font-family: Courier;">
                 <a id="excel:xlsx-package"></a><b><font color="#c00831">
                 excel:xlsx-package</font></b>(
                    </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      $content-types as element(types:Types), 
                      </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      $workbook as element(ms:workbook), 
                      </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      $rels as element(pr:Relationships), 
                      </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      $workbookrels as element(pr:Relationships), 
                      </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      $sheets as element(ms:worksheet)*, 
                      </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      [$worksheetrels as element(pr:Relationships)*], 
                      </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      [$table as element(ms:table)*]
                      </td>
				      </tr><tr>
					<td colspan="2" style="font-size: 11pt; font-family: Courier;">)&nbsp; as &nbsp;binary()</td>
				      </tr>
            </tbody></table>

          </td>
				</tr>

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12"></td>
				</tr>

        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
          <img src="images/varspace.gif" width="8">
          <b>Summary:</b>
          <div style="margin-left: 0.5in; margin-right: 8px; font-family: arial; font-size: 10pt;"> <br>
This function creates a .zip file that is the .xlsx package containing
the parts passed in as parameters. It is assumed the parts are properly
mapped to one another. <br/>Just using the constructors provided, and setting the number of worksheets, its possible to generate workbooks dynamically.  It's also quite simple to add a named range <br/>to a single worksheet. It can get a little tricker when adding multiple tables to multiple worksheets, but we've aimed to simplify workbook construction for you with the constructors provided.<br/><br/>
<i>  Some things to remember: Worksheets will appear in the Workbook in the order they are added within their sequence.  Tables must have unique names, and <br/>unique relationship ids.  (the constructor accounts for this by letting you add tables by number, as that's how they'll be saved within the .xlsx package natively.)  <br/>Every table must also have a worksheet relationship defined. Each worksheet has its own worksheet relationships filed saved within the .xlsx package.  <i/></div><br>
          </td>
				</tr>
        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
    <img src="images/varspace.gif" width="8">
    <b>Parameters:</b>
      <table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $content-types
                   :
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 The [Content_Types].xml part.
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $workbook
                   :
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 The workbook.xml part.
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $rels
                   :
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 The package Relationships part.
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $workbookrels
                   :
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 The workbook Relationships part.
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $sheets
                   :
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 The worksheet (sheetN.xml) parts.
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $worksheetrels
                   <font style="font-size: 10pt; font-family: Arial;"> 
                       (optional)</font>:
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 The sheetN.xml Relationships parts. (Required when mapping tables to sheets.)
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $table
                   <font style="font-size: 10pt; font-family: Arial;"> 
                       (optional)</font>:
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 The table.xml parts. (Used for named ranges, auto-filtering columns, styling, etc.)
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><br>
    </td>
				</tr>
 
        

        

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" width="8">
            <font style="font-size: 10pt; font-family: Arial;"><b>Example:</b></font>
            <div style="margin-left: 0.5in; margin-right: 8px; font-size: 9pt; font-family: Courier;"> 
            <pre xml:space="preserve">xquery version "1.0-ml";
import module namespace excel= "http://marklogic.com/openxml/excel" 
       at "/MarkLogic/openxml/spreadsheet-ml-support.xqy";
declare namespace ms = "http://schemas.openxmlformats.org/spreadsheetml/2006/main";

let $worksheets:= (&lt;ms:worksheet&gt;
                    &lt;ms:sheetData&gt;
                     &lt;ms:row&gt;
                       &lt;ms:c&gt;
                        &lt;ms:v&gt;1&lt;/ms:v&gt;
                       &lt;/ms:c&gt;
                     &lt;/ms:row&gt;
                    &lt;/ms:sheetData&gt;
                  &lt;/ms:worksheet&gt;)

let $ws-count := fn:count($worksheets)
let $content-types := excel:content-types($ws-count,0)
let $workbook := excel:workbook($ws-count)
let $rels :=  excel:package-rels()
let $workbookrels :=  excel:workbook-rels($ws-count)
let $package := excel:xlsx-package($content-types, $workbook, $rels, $workbookrels, $worksheets)

return xdmp:zip-manifest($package)
=&gt;
&lt;parts xmlns="xdmp:zip"&gt;
  &lt;part uncompressed-size="499" compressed-size="218" encrypted="false"&gt;[Content_Types].xml&lt;/part&gt;
  &lt;part uncompressed-size="229" compressed-size="146" encrypted="false"&gt;xl/workbook.xml&lt;/part&gt;
  &lt;part uncompressed-size="241" compressed-size="140" encrypted="false"&gt;_rels/.rels&lt;/part&gt;
  &lt;part uncompressed-size="242" compressed-size="144" encrypted="false"&gt;xl/_rels/workbook.xml.rels&lt;/part&gt;
  &lt;part uncompressed-size="172" compressed-size="115" encrypted="false"&gt;xl/worksheets/sheet1.xml&lt;/part&gt;
&lt;/parts&gt;
    
  </pre>
  
            </div>
            </td>
				</tr>

        <tr class="mainbody">
				  <td></td>
				</tr>
        </tbody></table><table class="mainbody" width="100%" border="0" cellpadding="0" cellspacing="0">

        <tbody><tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12">
      <hr class="control-line" size="1"></td>
				</tr>

        <tr class="mainbody">
				  <td>

            <table>
            <tbody><tr>
					<td colspan="2" style="font-size: 12pt; font-family: Courier;">
                 <a id="excel:xlsx-manifest"></a><b><font color="#c00831">
                 excel:xlsx-manifest</font></b>(
                    </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      $directory as xs:string, 
                      </td>
				      </tr><tr>
					<td width="20"></td>
					<td style="font-size: 11pt; font-family: Courier;">
                      $uris as xs:string*
                      </td>
				      </tr><tr>
					<td colspan="2" style="font-size: 11pt; font-family: Courier;">)&nbsp; as &nbsp;element(zip:parts)</td>
				      </tr>
            </tbody></table>

          </td>
				</tr>

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" height="12"></td>
				</tr>

        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
          <img src="images/varspace.gif" width="8">
          <b>Summary:</b>
          <div style="margin-left: 0.5in; margin-right: 8px; font-family: arial; font-size: 10pt;"> <br>
            This function constructs a manifest for the given URIs in the directory.
          </div><br>
          </td>
				</tr>
        <tr class="mainbody">
				  <td style="font-size: 10pt; font-family: Arial;">
    <img src="images/varspace.gif" width="8">
    <b>Parameters:</b>
      <table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $directory
                   :
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 The name of the directory.
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><table>
          <tbody><tr class="mainbody">
					<td style="font-size: 11pt; font-family: Arial;">
               <img src="images/varspace.gif" width="8">
                 <div style="margin-left: 0.5in; margin-right: 8px;">
                 <font style="font-size: 11pt; font-family: Courier;">
                   $uris
                   :
                 </font>
                 <font style="font-family: arial; font-size: 10pt;">
                 The URIs within the directory to be listed in the manifest.
                 </font>
                 </div> 
            </td>
				      </tr>
         </tbody></table><br>
    </td>
				</tr>
 
        

        

        <tr class="mainbody">
				  <td><img src="images/varspace.gif" width="8">
            <font style="font-size: 10pt; font-family: Arial;"><b>Example:</b></font>
            <div style="margin-left: 0.5in; margin-right: 8px; font-size: 9pt; font-family: Courier;"> 
            <pre xml:space="preserve">xquery version "1.0-ml";
import module namespace excel= "http://marklogic.com/openxml/excel" 
    at "/MarkLogic/openxml/spreadsheet-ml-support.xqy";

let $uris := ("/Default_xlsx_parts/xl/workbook.xml",
              "/Default_xlsx_parts/xl/worksheets/Sheet1.xml",
              "/Default_xlsx_parts/[Content_Types].xml",
              "/Default_xlsx_parts/_rels/.rels")

return excel:xlsx-manifest("/Default_xlsx_parts/",$uris)
=&gt;
&lt;parts xmlns="xdmp:zip"&gt;
  &lt;part&gt;xl/workbook.xml&lt;/part&gt;
  &lt;part&gt;xl/worksheets/Sheet1.xml&lt;/part&gt;
  &lt;part&gt;[Content_Types].xml&lt;/part&gt;
  &lt;part&gt;_rels/.rels&lt;/part&gt;
&lt;/parts&gt;
    

  </pre>
  
            </div>
            </td>
				</tr>

        <tr class="mainbody">
				  <td></td>
				</tr>
        </tbody></table>
       </td>
			  </tr>
      </tbody></table>
      </td>
		    </tr>
  </tbody></table>
    </td>
	      </tr>
  </tbody></table>
  </td>
	</tr>
</tbody></table>
      <table width="100%" align="left" border="0" cellpadding="0" cellspacing="0"><tbody><tr valign="middle" height="30">
	  <td class="copyright" style="padding-left: 10px;">
        © Copyright 2002-2010 Mark Logic Corporation.&nbsp;&nbsp;All rights reserved.
      </td>
	</tr></tbody></table>
    </form>
</body></html>
